Browse Source

very minor

David Rose 16 years ago
parent
commit
e4cb7fe829
2 changed files with 8 additions and 7 deletions
  1. 4 4
      direct/src/plugin/binaryXml.cxx
  2. 4 3
      direct/src/plugin/p3d_plugin.h

+ 4 - 4
direct/src/plugin/binaryXml.cxx

@@ -136,7 +136,7 @@ read_xml_node(istream &in) {
     // Read the element attributes.
     TiXmlElement *xelement = xnode->ToElement();
     assert(xelement != NULL);
-    bool got_attrib = (bool)in.get();
+    bool got_attrib = (bool)(in.get() != 0);
 
     while (got_attrib && in && !in.eof()) {
       // We have an attribute.
@@ -166,12 +166,12 @@ read_xml_node(istream &in) {
 
       xelement->SetAttribute(name, value);
 
-      got_attrib = (bool)in.get();
+      got_attrib = (bool)(in.get() != 0);
     }
   }
 
   // Now read all of the children.
-  bool got_child = (bool)in.get();
+  bool got_child = (bool)(in.get() != 0);
   
   while (got_child && in && !in.eof()) {
     // We have a child.
@@ -180,7 +180,7 @@ read_xml_node(istream &in) {
       xnode->LinkEndChild(xchild);
     }
 
-    got_child = (bool)in.get();
+    got_child = (bool)(in.get() != 0);
   }
 
   return xnode;

+ 4 - 3
direct/src/plugin/p3d_plugin.h

@@ -75,9 +75,10 @@ extern "C" {
 
 
 /* This symbol serves to validate that runtime and compile-time
-libraries match.  It should be passed to P3D_initialize() (below).
-This number will be incremented whenever there are changes to any of
-the interface specifications defined in this header file. */
+   libraries match.  It should be passed to P3D_initialize()
+   (below). This number will be incremented whenever there are changes
+   to any of the interface specifications defined in this header
+   file. */
 #define P3D_API_VERSION 4
 
 /************************ GLOBAL FUNCTIONS **************************/