Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7978


Ignore:
Timestamp:
Feb 27, 2011, 3:11:42 AM (14 years ago)
Author:
rgrieder
Message:

Increased code readability by replacing some BLANKSTRING with plain old "".

Location:
code/branches/usability/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • code/branches/usability/src/modules/objects/triggers/DistanceMultiTrigger.cc

    r7601 r7978  
    5454
    5555        this->distance_ = 100.0f;
    56         this->targetName_ = BLANKSTRING;
     56        this->targetName_ = "";
    5757        this->singleTargetMode_ = false;
    5858    }
     
    181181    {
    182182        // If the targetname is no blank string single-target mode is enabled.
    183         if(targetname.compare(BLANKSTRING) != 0)
     183        if(targetname != "")
    184184            this->singleTargetMode_ = true;
    185185        else
  • code/branches/usability/src/modules/objects/triggers/DistanceTrigger.cc

    r7601 r7978  
    5050    this->distance_ = 100;
    5151    this->targetMask_.exclude(Class(BaseObject));
    52     this->targetName_ = BLANKSTRING;
     52    this->targetName_ = "";
    5353    this->singleTargetMode_ = false;
    5454  }
  • code/branches/usability/src/modules/objects/triggers/DistanceTrigger.h

    r7601 r7978  
    7070
    7171      inline void setTargetName(const std::string& targetname)
    72         { if(targetname.compare(BLANKSTRING) != 0) this->singleTargetMode_ = true; else this->singleTargetMode_ = false; this->targetName_ = targetname; }
     72        { if(targetname != "") this->singleTargetMode_ = true; else this->singleTargetMode_ = false; this->targetName_ = targetname; }
    7373      inline const std::string& getTargetName(void)
    7474        { return this->targetName_; }
  • code/branches/usability/src/modules/pickup/PickupRepresentation.cc

    r7548 r7978  
    156156        {
    157157            COUT(4) << "PickupRepresentation: No spawner representation found." << std::endl;
    158             if(this->spawnerTemplate_ == BLANKSTRING)
     158            if(this->spawnerTemplate_ == "")
    159159            {
    160160                COUT(4) << "PickupRepresentation: Spawner template is empty." << std::endl;
  • code/branches/usability/src/modules/questsystem/effects/AddQuestHint.cc

    r7552 r7978  
    8686    bool AddQuestHint::setHintId(const std::string & id)
    8787    {
    88         if(id.compare(BLANKSTRING) == 0)
     88        if(id == "")
    8989        {
    9090            COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl;
  • code/branches/usability/src/modules/questsystem/effects/ChangeQuestStatus.cc

    r7456 r7978  
    8181    bool ChangeQuestStatus::setQuestId(const std::string & id)
    8282    {
    83         if(id.compare(BLANKSTRING) == 0)
     83        if(id == "")
    8484        {
    8585            COUT(2) << "Invalid id. QuestItem id {" << id << "} could not be set." << std::endl;
  • code/branches/usability/src/orxonox/gamestates/GSLevel.cc

    r7879 r7978  
    5555
    5656    SetConsoleCommand(__CC_startMainMenu_name, &GSLevel::startMainMenu).deactivate();
    57     SetConsoleCommand(__CC_changeGame_name, &GSLevel::changeGame).defaultValues(BLANKSTRING).deactivate();
     57    SetConsoleCommand(__CC_changeGame_name, &GSLevel::changeGame).defaultValues("").deactivate();
    5858
    5959    GSLevel::GSLevel(const GameStateInfo& info)
     
    202202    /*static*/ void GSLevel::changeGame(const std::string& level)
    203203    {
    204         if(level != BLANKSTRING)
     204        if(level != "")
    205205            LevelManager::getInstance().setDefaultLevel(level);
    206206
  • code/branches/usability/src/orxonox/gamestates/GSMainMenu.cc

    r7966 r7978  
    5757    static const std::string __CC_setMainMenuSoundPath_name = "setMMSoundPath";
    5858
    59     SetConsoleCommand(__CC_startStandalone_name,      &GSMainMenu::startStandalone).defaultValues(BLANKSTRING).deactivate();
    60     SetConsoleCommand(__CC_startServer_name,          &GSMainMenu::startServer    ).defaultValues(BLANKSTRING).deactivate();
    61     SetConsoleCommand(__CC_startClient_name,          &GSMainMenu::startClient    ).defaultValues(BLANKSTRING).deactivate();
    62     SetConsoleCommand(__CC_startDedicated_name,       &GSMainMenu::startDedicated ).defaultValues(BLANKSTRING).deactivate();
     59    SetConsoleCommand(__CC_startStandalone_name,      &GSMainMenu::startStandalone).defaultValues("").deactivate();
     60    SetConsoleCommand(__CC_startServer_name,          &GSMainMenu::startServer    ).defaultValues("").deactivate();
     61    SetConsoleCommand(__CC_startClient_name,          &GSMainMenu::startClient    ).defaultValues("").deactivate();
     62    SetConsoleCommand(__CC_startDedicated_name,       &GSMainMenu::startDedicated ).defaultValues("").deactivate();
    6363    SetConsoleCommand(__CC_setMainMenuSoundPath_name, &GSMainMenu::setMainMenuSoundPath).hide();
    6464
     
    176176    void GSMainMenu::startStandalone(const std::string& level)
    177177    {
    178         if(level != BLANKSTRING)
     178        if(level != "")
    179179            LevelManager::getInstance().setDefaultLevel(level);
    180180
     
    192192    void GSMainMenu::startServer(const std::string& level)
    193193    {
    194         if(level != BLANKSTRING)
     194        if(level != "")
    195195            LevelManager::getInstance().setDefaultLevel(level);
    196196
     
    208208    void GSMainMenu::startClient(const std::string& destination)
    209209    {
    210         if(destination != BLANKSTRING)
     210        if(destination != "")
    211211            Client::getInstance()->setDestination(destination, NETWORK_PORT);
    212212
     
    224224    void GSMainMenu::startDedicated(const std::string& level)
    225225    {
    226         if(level != BLANKSTRING)
     226        if(level != "")
    227227            LevelManager::getInstance().setDefaultLevel(level);
    228228
  • code/branches/usability/src/orxonox/gamestates/GSMainMenu.h

    r7876 r7978  
    5353        void setMainMenuSoundPath(const std::string& path);
    5454
    55         static void startStandalone(const std::string& level = BLANKSTRING); //!< Start a level in standalone mode.
    56         static void startServer(const std::string& level = BLANKSTRING); //!< Start a level in server mode.
    57         static void startClient(const std::string& destination = BLANKSTRING); //!< Connect to a game as client.
    58         static void startDedicated(const std::string& level = BLANKSTRING); //!< Start a level in dedicated mode.
     55        static void startStandalone(const std::string& level = ""); //!< Start a level in standalone mode.
     56        static void startServer(const std::string& level = ""); //!< Start a level in server mode.
     57        static void startClient(const std::string& destination = ""); //!< Connect to a game as client.
     58        static void startDedicated(const std::string& level = ""); //!< Start a level in dedicated mode.
    5959        static void startIOConsole();
    6060
Note: See TracChangeset for help on using the changeset viewer.