Skip to content

Commit

Permalink
Addressing minor issues caught by clang static analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewfb committed Apr 17, 2013
1 parent afefd29 commit f1fbf4f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions blocks/Cairo/src/Cairo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -784,8 +784,9 @@ FontFace::FontFace( cairo_font_face_t *aCairoFontFace ) : mCairoFontFace( aCairo
FontFace::FontFace( const std::string &faceName )
{
#if defined( CAIRO_HAS_QUARTZ_FONT )
CFStringRef nameRef = CFStringCreateWithCString( kCFAllocatorDefault, faceName.c_str(), kCFStringEncodingUTF8 );
CGFontRef fontRef = CGFontCreateWithFontName( nameRef );
mCairoFontFace = NULL; // in case we throw below
CFStringRef nameRef = ::CFStringCreateWithCString( kCFAllocatorDefault, faceName.c_str(), kCFStringEncodingUTF8 );
CGFontRef fontRef = ::CGFontCreateWithFontName( nameRef );
if( ! fontRef )
throw FontInvalidNameExc();
mCairoFontFace = cairo_quartz_font_face_create_for_cgfont( fontRef );
Expand Down
4 changes: 2 additions & 2 deletions samples/VoronoiGpu/src/VoronoiGpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ ci::Surface32f calcDiscreteVoronoiGpu( const std::vector<ci::Vec2i> &points, int
// ping-pong between the two FBOs
voronoiShader.bind();
voronoiShader.uniform( "tex0", 0 );
int curFbo;
int curFbo = 0;
int numPasses = log2ceil( std::max( width, height ) );
for( int pass = 1; pass <= numPasses; ++pass ) {
voronoiShader.uniform( "sampleScale", Vec2f( 1, 1 ) * (float)( 1 << ( numPasses - pass ) ) );
Expand Down Expand Up @@ -135,7 +135,7 @@ ci::Channel32f calcDistanceMapGpu( const vector<Vec2i> &points, int width, int h
// ping-pong between the two FBOs
voronoiShader.bind();
voronoiShader.uniform( "tex0", 0 );
int curFbo;
int curFbo = 0;
int numPasses = log2ceil( std::max( width, height ) );
for( int pass = 1; pass <= numPasses; ++pass ) {
voronoiShader.uniform( "sampleScale", Vec2f( 1, 1 ) * (float)( 1 << ( numPasses - pass ) ) );
Expand Down
2 changes: 1 addition & 1 deletion samples/waterSim/src/waterSimApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void init_water_drop( Grid &grid, Particles &particles, int na, int nb, int drop
project(grid, x, y, phi, -0.75*grid.h/na, center);
phi=fluidphi(grid, x, y, dropType, center );
project(grid, x, y, phi, -0.75*grid.h/na, center);
phi=fluidphi(grid, x, y, dropType, center );
/*phi=fluidphi(grid, x, y, dropType, center );*/

}
particles.add_particle( Vec2f(x,y), Vec2f(0,0) );
Expand Down

0 comments on commit f1fbf4f

Please sign in to comment.