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/triggers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/modules/objects/triggers/DistanceTrigger.cc

    r5937 r6394  
    9292    if (!targetId)
    9393    {
    94         COUT(1) << "Error: \"" << targets << "\" is not a valid class name to include in ClassTreeMask (in " << this->getName() << ", class " << this->getIdentifier()->getName() << ")" << std::endl;
     94        COUT(1) << "Error: \"" << targets << "\" is not a valid class name to include in ClassTreeMask (in " << this->getName() << ", class " << this->getIdentifier()->getName() << ')' << std::endl;
    9595        return;
    9696    }
  • code/branches/presentation2/src/modules/objects/triggers/Trigger.cc

    r5929 r6394  
    280280  {
    281281    if (this->mode_ == TriggerMode::EventTriggerAND)
    282       return std::string("and");
     282      return "and";
    283283    else if (this->mode_ == TriggerMode::EventTriggerOR)
    284       return std::string("or");
     284      return "or";
    285285    else if (this->mode_ == TriggerMode::EventTriggerXOR)
    286       return std::string("xor");
     286      return "xor";
    287287    else
    288       return std::string("and");
     288      return "and";
    289289  }
    290290
Note: See TracChangeset for help on using the changeset viewer.