why doesn't the reverse lookup return a Symbol?

damn! I have the vague rememberance that I had a reason for
not returning a Symbol. Anyway, here it goes...
This commit is contained in:
Fischlurch 2009-10-08 21:41:20 +02:00
parent d2acf48587
commit 2ad896027b
2 changed files with 3 additions and 3 deletions

View file

@ -195,7 +195,7 @@ namespace control {
* @param cmdInstance using the definition to look up
* @return the ID used to register this definition
* or \c NULL in case of an "anonymous" command */
const char*
Symbol
findDefinition (Command const& cmdInstance) const
{
Lock sync(this);

View file

@ -112,7 +112,7 @@ namespace test {
Command cmd1 = registry.queryIndex (TEST_CMD);
ASSERT (cmd1);
ASSERT (string(TEST_CMD) == registry.findDefinition(cmd1));
ASSERT (TEST_CMD == registry.findDefinition(cmd1));
Command nonexistant = registry.queryIndex("miraculous");
ASSERT (!nonexistant);
@ -149,7 +149,7 @@ namespace test {
ASSERT (1+cnt_inst == registry.instance_count());
ASSERT (1+cnt_defs == registry.index_size());
ASSERT (string(TEST_CMD2) == registry.findDefinition(cmdX));
ASSERT (TEST_CMD2 == registry.findDefinition(cmdX));
ASSERT ( registry.remove(TEST_CMD2));
ASSERT (!registry.remove("miraculous"));