Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 22, 2009, 2:07:44 PM (14 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/gametypes/Asteroids.cc

    r5929 r6394  
    7272        Gametype::start();
    7373
    74         std::string message = "The match has started! Reach the first chekpoint within 15 seconds! But be aware, there may be pirates around...";
     74        std::string message("The match has started! Reach the first chekpoint within 15 seconds! But be aware, there may be pirates around...");
    7575        COUT(0) << message << std::endl;
    7676        Host::Broadcast(message);
     
    8181        Gametype::end();
    8282
    83         std::string message = "The match has ended.";
     83        std::string message("The match has ended.");
    8484        COUT(0) << message << std::endl;
    8585        Host::Broadcast(message);
Note: See TracChangeset for help on using the changeset viewer.