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/libraries/core/Shell.h

    r6375 r6394  
    9696                { return this->inputBuffer_->getCursorPosition(); }
    9797
    98             inline std::string getInput() const
     98            inline const std::string& getInput() const
    9999                { return this->inputBuffer_->get(); }
    100100
     
    118118
    119119            void addToHistory(const std::string& command);
    120             std::string getFromHistory() const;
     120            const std::string& getFromHistory() const;
    121121            void clearInput();
    122122            // OutputListener
Note: See TracChangeset for help on using the changeset viewer.