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/input/InputBuffer.cc

    r6177 r6394  
    3939        RegisterRootObject(InputBuffer);
    4040
    41         this->buffer_ = "";
    4241        this->cursor_ = 0;
    4342        this->maxLength_ = 1024;
     
    6261        this->maxLength_ = 1024;
    6362        this->allowedChars_ = allowedChars;
    64         this->buffer_ = "";
    6563        this->cursor_ = 0;
    6664
     
    138136    void InputBuffer::clear(bool update)
    139137    {
    140         this->buffer_ = "";
     138        this->buffer_.clear();
    141139        this->cursor_ = 0;
    142140
     
    188186    bool InputBuffer::charIsAllowed(const char& input)
    189187    {
    190         if (this->allowedChars_ == "")
     188        if (this->allowedChars_.empty())
    191189            return true;
    192190        else
Note: See TracChangeset for help on using the changeset viewer.