Fixed minor c++ issues found by cppcheck
http://codereview.appspot.com/6127049/ git-svn-id: http://skia.googlecode.com/svn/trunk@3771 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
725a295c50
commit
05141c23ed
@ -24,7 +24,7 @@
|
||||
class SkSocket {
|
||||
public:
|
||||
SkSocket();
|
||||
~SkSocket();
|
||||
virtual ~SkSocket();
|
||||
|
||||
enum State {
|
||||
kError_state,
|
||||
@ -152,7 +152,7 @@ protected:
|
||||
class SkTCPServer : public SkSocket {
|
||||
public:
|
||||
SkTCPServer(int port = DEFAULT_PORT);
|
||||
~SkTCPServer();
|
||||
virtual ~SkTCPServer();
|
||||
|
||||
/**
|
||||
* Accept any incoming connections to the server, will accept 1 connection
|
||||
|
@ -303,7 +303,7 @@ public:
|
||||
class SkPDFFunctionShader : public SkPDFDict, public SkPDFShader {
|
||||
public:
|
||||
explicit SkPDFFunctionShader(SkPDFShader::State* state);
|
||||
~SkPDFFunctionShader() {
|
||||
virtual ~SkPDFFunctionShader() {
|
||||
if (isValid()) {
|
||||
RemoveShader(this);
|
||||
}
|
||||
@ -328,7 +328,7 @@ private:
|
||||
class SkPDFImageShader : public SkPDFStream, public SkPDFShader {
|
||||
public:
|
||||
explicit SkPDFImageShader(SkPDFShader::State* state);
|
||||
~SkPDFImageShader() {
|
||||
virtual ~SkPDFImageShader() {
|
||||
RemoveShader(this);
|
||||
fResources.unrefAll();
|
||||
}
|
||||
|
@ -60,6 +60,7 @@ protected:
|
||||
static void RemoveShader(SkPDFObject* shader);
|
||||
|
||||
SkPDFShader();
|
||||
virtual ~SkPDFShader() {};
|
||||
|
||||
virtual bool isValid() = 0;
|
||||
};
|
||||
|
3
third_party/glu/README.skia
vendored
3
third_party/glu/README.skia
vendored
@ -42,3 +42,6 @@ The following changes were made in order to incorporate this code:
|
||||
|
||||
- In sweep.c, added explicit cast to GLfloat in VertexWeights() to silence
|
||||
compiler complaint
|
||||
|
||||
- In mesh.c in method __gl_meshMakeEdge, added memory cleanup when
|
||||
MakeEdge failed
|
||||
|
7
third_party/glu/libtess/mesh.c
vendored
7
third_party/glu/libtess/mesh.c
vendored
@ -291,7 +291,12 @@ GLUhalfEdge *__gl_meshMakeEdge( GLUmesh *mesh )
|
||||
}
|
||||
|
||||
e = MakeEdge( &mesh->eHead );
|
||||
if (e == NULL) return NULL;
|
||||
if (e == NULL) {
|
||||
memFree(newVertex1);
|
||||
memFree(newVertex2);
|
||||
memFree(newFace);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
MakeVertex( newVertex1, e, &mesh->vHead );
|
||||
MakeVertex( newVertex2, e->Sym, &mesh->vHead );
|
||||
|
Loading…
Reference in New Issue
Block a user