[Avida-cvs] [avida-svn] r577 - development/source/event
brysonda@myxo.css.msu.edu
brysonda at myxo.css.msu.edu
Thu Apr 6 21:51:04 PDT 2006
Author: brysonda
Date: 2006-04-07 00:51:04 -0400 (Fri, 07 Apr 2006)
New Revision: 577
Modified:
development/source/event/cEventManager.cc
Log:
Some macro fixes.
Modified: development/source/event/cEventManager.cc
===================================================================
--- development/source/event/cEventManager.cc 2006-04-07 01:00:31 UTC (rev 576)
+++ development/source/event/cEventManager.cc 2006-04-07 04:51:04 UTC (rev 577)
@@ -257,12 +257,12 @@
private: /* 3 */ \
cString fname; /* 4 */ \
public: /* 5 */ \
- const cString GetName() const { return "NAME"; } /* 6 */ \
- const cString GetDescription() const { return "NAME [cString fname=\"DEFAULT\"]"; } /* 7 */ \
+ const cString GetName() const { return #NAME; } /* 6 */ \
+ const cString GetDescription() const { return #NAME " [cString fname=\"" #DEFAULT "\"]"; } /* 7 */ \
void Configure(cWorld* world, const cString& in_args) /* 8 */ \
{ /* 9 */ \
m_world = world; m_args = in_args; cString args(in_args); /* 10 */ \
- if (args == "") fname="DEFAULT"; else fname=args.PopWord(); /* 11 */ \
+ if (args == "") fname = #DEFAULT; else fname=args.PopWord(); /* 11 */ \
} /* 12 */ \
void Process() { m_world->GetStats().METHOD(fname); } /* 13 */ \
} /* 14 */ \
@@ -3537,7 +3537,7 @@
}
};
-#define REGISTER(EVENT_NAME) Register<cEvent_ ## EVENT_NAME>("EVENT_NAME")
+#define REGISTER(EVENT_NAME) Register<cEvent_ ## EVENT_NAME>(#EVENT_NAME)
cEventManager::cEventManager(cWorld* world) : m_world(world)
{
More information about the Avida-cvs
mailing list