[Avida-SVN] r3366 - development/source/analyze
beckma24 at myxo.css.msu.edu
beckma24 at myxo.css.msu.edu
Thu Aug 13 14:51:41 PDT 2009
Author: beckma24
Date: 2009-08-13 17:51:41 -0400 (Thu, 13 Aug 2009)
New Revision: 3366
Modified:
development/source/analyze/cAnalyze.cc
Log:
Tisk tisk. Someone forgot to initialize m_resource_time_spent_offset, which means if you used LOAD_RESOURCES after this undocumented feature was added it is VERY possible that your analyzed results are not correct. All tests pass
Modified: development/source/analyze/cAnalyze.cc
===================================================================
--- development/source/analyze/cAnalyze.cc 2009-08-12 19:44:29 UTC (rev 3365)
+++ development/source/analyze/cAnalyze.cc 2009-08-13 21:51:41 UTC (rev 3366)
@@ -105,6 +105,7 @@
, m_ctx(world->GetDefaultContext())
, m_jobqueue(world)
, m_resources(NULL)
+, m_resource_time_spent_offset(0)
, interactive_depth(0)
{
random.ResetSeed(m_world->GetConfig().RANDOM_SEED.Get());
@@ -427,8 +428,10 @@
int words = cur_string.CountNumWords();
cString filename = "resource.dat";
- if (words >= 1) filename = cur_string.PopWord();
- if (words >= 2) m_resource_time_spent_offset = cur_string.PopWord().AsInt();
+ if (words >= 1)
+ filename = cur_string.PopWord();
+ if (words >= 2) // TODO: document this feature! I would do it, but I don't know what it means. (BEB)
+ m_resource_time_spent_offset = cur_string.PopWord().AsInt();
cout << "Loading Resources from: " << filename << endl;
More information about the Avida-cvs
mailing list