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/modules/objects/eventsystem
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/modules/objects/eventsystem/EventFilter.cc

    r5929 r6394  
    6262        if (this->bActive_)
    6363        {
    64             COUT(2) << "Warning: Detected Event loop in EventFilter \"" << this->getName() << "\"" << std::endl;
     64            COUT(2) << "Warning: Detected Event loop in EventFilter \"" << this->getName() << '"' << std::endl;
    6565            return;
    6666        }
  • code/branches/presentation2/src/modules/objects/eventsystem/EventListener.cc

    r5929 r6394  
    5858        if (this->bActive_)
    5959        {
    60             COUT(2) << "Warning: Detected Event loop in EventListener \"" << this->getName() << "\"" << std::endl;
     60            COUT(2) << "Warning: Detected Event loop in EventListener \"" << this->getName() << '"' << std::endl;
    6161            return;
    6262        }
     
    7171        this->eventName_ = eventname;
    7272
    73         if (this->eventName_ == "")
     73        if (this->eventName_.empty())
    7474            return;
    7575
     
    8181    void EventListener::loadedNewXMLName(BaseObject* object)
    8282    {
    83         if (this->eventName_ == "")
     83        if (this->eventName_.empty())
    8484            return;
    8585
  • code/branches/presentation2/src/modules/objects/eventsystem/EventTarget.cc

    r6387 r6394  
    6060        if (this->bActive_)
    6161        {
    62             COUT(2) << "Warning: Detected Event loop in EventTarget \"" << this->getName() << "\"" << std::endl;
     62            COUT(2) << "Warning: Detected Event loop in EventTarget \"" << this->getName() << '"' << std::endl;
    6363            return;
    6464        }
     
    8080    void EventTarget::loadedNewXMLName(BaseObject* object)
    8181    {
    82         if (this->target_ == "")
     82        if (this->target_.empty())
    8383            return;
    8484
Note: See TracChangeset for help on using the changeset viewer.