Use bool instead of int to represent boolean values
This commit is contained in:
parent
f4f5ab2392
commit
373a0e4a7d
@ -303,7 +303,7 @@ void SGMaterial::set_state( osg::StateSet *s )
|
||||
}
|
||||
|
||||
void SGMaterial::assignTexture( osg::StateSet *state, const std::string &fname,
|
||||
int _wrapu, int _wrapv, int _mipmap )
|
||||
bool _wrapu, bool _wrapv, bool _mipmap )
|
||||
{
|
||||
osg::Texture2D* texture = SGLoadTexture2D(fname, 0, _wrapu, _wrapv,
|
||||
mipmap ? -1 : 0);
|
||||
|
@ -299,7 +299,7 @@ private:
|
||||
bool wrapu, wrapv;
|
||||
|
||||
// use mipmapping?
|
||||
int mipmap;
|
||||
bool mipmap;
|
||||
|
||||
// coverage of night lighting.
|
||||
double light_coverage;
|
||||
@ -359,7 +359,7 @@ private:
|
||||
void build_state( bool defer_tex_load );
|
||||
void set_state( osg::StateSet *s );
|
||||
|
||||
void assignTexture( osg::StateSet *state, const std::string &fname, int _wrapu = TRUE, int _wrapv = TRUE, int _mipmap = TRUE );
|
||||
void assignTexture( osg::StateSet *state, const std::string &fname, bool _wrapu = true, bool _wrapv = true, bool _mipmap = true );
|
||||
|
||||
};
|
||||
|
||||
|
@ -237,7 +237,7 @@ bool TileEntry::obj_load( const string& path,
|
||||
if (node)
|
||||
geometry->addChild(node);
|
||||
|
||||
return node;
|
||||
return node != 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -63,7 +63,7 @@ static bool print_openal_error(const string &s = "unknown") {
|
||||
} else {
|
||||
SG_LOG( SG_GENERAL, SG_ALERT, "Unhandled error code = " << error );
|
||||
}
|
||||
return error;
|
||||
return error != 0;
|
||||
}
|
||||
|
||||
// empry constructor
|
||||
|
Loading…
Reference in New Issue
Block a user