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
Location:
code/branches/presentation2/src/orxonox/items
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/orxonox/items/Engine.h

    r5929 r6394  
    106106            virtual const Vector3& getDirection() const;
    107107
    108             void loadSound(const std::string filename);
    109 
    110108        private:
    111109            void networkcallback_shipID();
  • code/branches/presentation2/src/orxonox/items/MultiStateEngine.cc

    r6381 r6394  
    3535
    3636#include "util/Convert.h"
    37 #include "util/StringUtils.h"
    3837#include "core/CoreIncludes.h"
    3938#include "core/GameMode.h"
     
    201200        if (effect == NULL)
    202201            return;
    203         effect->setLuaState(this->lua_, "f" + multi_cast<std::string>(this->effectContainers_.size()));
     202        effect->setLuaState(this->lua_, 'f' + multi_cast<std::string>(this->effectContainers_.size()));
    204203        this->effectContainers_.push_back(effect);
    205204        if (this->getShip())
Note: See TracChangeset for help on using the changeset viewer.