[Orxonox-commit 3279] r7970 - code/branches/usability/src/modules/questsystem
dafrick at orxonox.net
dafrick at orxonox.net
Sat Feb 26 19:38:59 CET 2011
Author: dafrick
Date: 2011-02-26 19:38:59 +0100 (Sat, 26 Feb 2011)
New Revision: 7970
Modified:
code/branches/usability/src/modules/questsystem/QuestItem.cc
code/branches/usability/src/modules/questsystem/QuestManager.cc
Log:
Fixing stupid bug in QuestManager, its really strange that it worked so far.
Modified: code/branches/usability/src/modules/questsystem/QuestItem.cc
===================================================================
--- code/branches/usability/src/modules/questsystem/QuestItem.cc 2011-02-26 18:02:21 UTC (rev 7969)
+++ code/branches/usability/src/modules/questsystem/QuestItem.cc 2011-02-26 18:38:59 UTC (rev 7970)
@@ -86,7 +86,7 @@
*/
void QuestItem::setId(const std::string & id)
{
- if(id.compare(BLANKSTRING) == 0) // Checks whether the id is a valid id.
+ if(id == "") // Checks whether the id is a valid id.
{
COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl;
return;
Modified: code/branches/usability/src/modules/questsystem/QuestManager.cc
===================================================================
--- code/branches/usability/src/modules/questsystem/QuestManager.cc 2011-02-26 18:02:21 UTC (rev 7969)
+++ code/branches/usability/src/modules/questsystem/QuestManager.cc 2011-02-26 18:38:59 UTC (rev 7970)
@@ -90,7 +90,7 @@
/**
@brief
- Registers a Quest with the QuestManager to make it globally accessable.
+ Registers a Quest with the QuestManager to make it globally accessible.
Uses it's id to make sure to be able to be identify and retrieve it later.
@param quest
The Quest that is to be registered.
@@ -128,7 +128,7 @@
/**
@brief
- Registers a QuestHint with the QuestManager to make it globally accessable.
+ Registers a QuestHint with the QuestManager to make it globally accessible.
Uses it's id to make sure to be able to be identify and retrieve it later.
@param hint
The QuestHint to be registered.
@@ -177,7 +177,7 @@
*/
Quest* QuestManager::findQuest(const std::string & questId)
{
- if(questId.compare(BLANKSTRING) == 1) // Check vor validity of the given id.
+ if(questId == "") // Check for validity of the given id.
ThrowException(Argument, "Invalid questId.");
Quest* quest;
@@ -206,7 +206,7 @@
*/
QuestHint* QuestManager::findHint(const std::string & hintId)
{
- if(hintId.compare(BLANKSTRING) == 1) // Check vor validity of the given id.
+ if(hintId == "") // Check for validity of the given id.
ThrowException(Argument, "Invalid hintId.");
QuestHint* hint;
More information about the Orxonox-commit
mailing list