Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 22, 2009, 2:07:44 PM (15 years ago)
Author:
rgrieder
Message:

std::string tweaks:

  • Declared BLANKSTRING in UtilPrereqs.h as well (removed obsolete StringUtils.h includes to avoid dependencies)
  • Using BLANKSTRING if const std::string& return type is possible
  • Replaced a few (const) std::string arguments with const std::string&
  • if (str == "") —> if (str.empty())
  • std::string msg = name + "adsf"; —> const std::string& msg = name + "asdf";
  • std::string asdf = object→getFooBar(); —> const std::string& asdf = object→getFooBar();
  • std::string asdf = "asdf"; —> std::string asdf("asdf");
  • ostream << "."; and name + "." —> ostream << '.'; and name + '.'
  • str = ""; —> str.clear()
  • std::string asdf = ""; —> std::string asdf;
  • asdf_ = ""; (in c'tor) —> delete line
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/orxonox/infos/HumanPlayer.cc

    r6108 r6394  
    164164        if (this->isInitialized() && this->isLocalPlayer())
    165165        {
    166             if (this->getGametype() && this->getGametype()->getHUDTemplate() != "")
     166            if (this->getGametype() && !this->getGametype()->getHUDTemplate().empty())
    167167                this->setGametypeHUDTemplate(this->getGametype()->getHUDTemplate());
    168168            else
     
    179179        }
    180180
    181         if (this->isLocalPlayer() && this->humanHudTemplate_ != "" && GameMode::showsGraphics())
     181        if (this->isLocalPlayer() && !this->humanHudTemplate_.empty() && GameMode::showsGraphics())
    182182        {
    183183            this->humanHud_ = new OverlayGroup(this);
     
    195195        }
    196196
    197         if (this->isLocalPlayer() && this->gametypeHudTemplate_ != "")
     197        if (this->isLocalPlayer() && !this->gametypeHudTemplate_.empty())
    198198        {
    199199            this->gametypeHud_ = new OverlayGroup(this);
Note: See TracChangeset for help on using the changeset viewer.