[Avida-cvs] [avida-svn] r634 - in development: . source/tools

kaben@myxo.css.msu.edu kaben at myxo.css.msu.edu
Tue May 2 19:38:26 PDT 2006


Author: kaben
Date: 2006-05-02 22:38:26 -0400 (Tue, 02 May 2006)
New Revision: 634

Modified:
   development/SConstruct
   development/source/tools/cInitFile.cc
Log:

Bugfix: cInitFile wouldn't tell about its contents after it had been
closed.

Added compiler flag "-DENABLE_UNIT_TESTS" when testing under SCons
build.



Modified: development/SConstruct
===================================================================
--- development/SConstruct	2006-05-02 22:33:15 UTC (rev 633)
+++ development/SConstruct	2006-05-03 02:38:26 UTC (rev 634)
@@ -29,7 +29,7 @@
 
 if environment.subst('$enableTestCode') in ['1', 'yes']:
   environment.SetDefault(enableSharedPtr = 1)
-  environment.Append(CPPDEFINES = ['USE_tMemTrack=1'])
+  environment.Append(CPPDEFINES = ['USE_tMemTrack=1', 'ENABLE_UNIT_TESTS=1'])
 
 environment.Append(
   CPPPATH = [

Modified: development/source/tools/cInitFile.cc
===================================================================
--- development/source/tools/cInitFile.cc	2006-05-02 22:33:15 UTC (rev 633)
+++ development/source/tools/cInitFile.cc	2006-05-03 02:38:26 UTC (rev 634)
@@ -215,7 +215,7 @@
 cString cInitFile::ReadString(const cString & name, cString def) const
 {
   // See if we definately can't find the keyword.
-  if (name == "" || IsOpen() == false) return def;
+  if (name == "") return def;
 
   // Search for the keyword.
   cString cur_line;




More information about the Avida-cvs mailing list