]> git.mxchange.org Git - simgear.git/commitdiff
Use bool instead of int to represent boolean values
authorfredb <fredb>
Sat, 31 May 2008 10:02:43 +0000 (10:02 +0000)
committerfredb <fredb>
Sat, 31 May 2008 10:02:43 +0000 (10:02 +0000)
simgear/scene/material/mat.cxx
simgear/scene/material/mat.hxx
simgear/scene/tgdb/TileEntry.cxx
simgear/sound/sample_openal.cxx

index 3da8824a3fe40bb6de0dcf3b77551abc8223834b..2d488f345eb7db8da34c8bbebbba5b3a9fcdd932 100644 (file)
@@ -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);
index 96a33a3aba006efc28df33c34e5aa795833130ce..6d0c89af58e245a40e19277b0247e06fb4161f5d 100644 (file)
@@ -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 );
 
 };
 
index 2782c023b3f97f33043c5fd5be301b9bf0040548..ea0c73e401f0ed68396207dff02cf10c5efe3111 100644 (file)
@@ -237,7 +237,7 @@ bool TileEntry::obj_load( const string& path,
     if (node)
       geometry->addChild(node);
 
-    return node;
+    return node != 0;
 }
 
 
index 0d62cac47bad6228b53b8bcd5f6eb43d35a85f7c..4f34f79aed0181dbfc5d2ef31a96cd5cfe5a8580 100644 (file)
@@ -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