[Avida-SVN] r3163 - in development/source: cpu tools

brysonda at myxo.css.msu.edu brysonda at myxo.css.msu.edu
Wed Feb 25 10:54:04 PST 2009


Author: brysonda
Date: 2009-02-25 13:54:04 -0500 (Wed, 25 Feb 2009)
New Revision: 3163

Modified:
   development/source/cpu/cHardwareExperimental.h
   development/source/tools/cString.cc
Log:
And yet more warning fixes.

Modified: development/source/cpu/cHardwareExperimental.h
===================================================================
--- development/source/cpu/cHardwareExperimental.h	2009-02-25 18:38:53 UTC (rev 3162)
+++ development/source/cpu/cHardwareExperimental.h	2009-02-25 18:54:04 UTC (rev 3163)
@@ -107,7 +107,7 @@
     unsigned int oldest_component:15;
     unsigned int env_component:1;
     
-    inline sInternalValue() { ; }
+    inline sInternalValue() : value(0) { ; }
     inline void Clear() { value = 0; originated = 0; from_env = 0, oldest_component = 0; env_component = 0; }
     inline sInternalValue& operator=(const sInternalValue& i);
   };

Modified: development/source/tools/cString.cc
===================================================================
--- development/source/tools/cString.cc	2009-02-25 18:38:53 UTC (rev 3162)
+++ development/source/tools/cString.cc	2009-02-25 18:54:04 UTC (rev 3163)
@@ -80,17 +80,13 @@
   // -1 (*this<in), 0 (*this==in), 1 (*this>in) ... just like strcmp()
   assert(in!=NULL);  // NULL input string
   int i;
-  for( i = 0;
-      i < GetSize() && in[i]!='\0' && (*this)[i] == in[i];
-      i++ );
+  for (i = 0; i < GetSize() && in[i]!='\0' && (*this)[i] == in[i]; i++) ;
   
-  if( i == GetSize()  &&  in[i] == '\0' ) {
-    return 0;                // *this == in
-  }
+  if (i == GetSize() && in[i] == '\0') return 0;      // *this == in
   
   // They're not equal!
-  if ( i < GetSize() && (*this)[i] > in[i] )  return 1;  // *this > in
-  return -1;                                             // *this < in
+  if (i < GetSize() && (*this)[i] > in[i]) return 1;  // *this > in
+  return -1;                                          // *this < in
 }
 
 bool cString::IsContinueLine()




More information about the Avida-cvs mailing list