Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 22, 2009, 2:07:44 PM (14 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/CommandExecutor.h

    r5781 r6394  
    9090            static unsigned int argumentsGiven();
    9191            static bool enoughArgumentsGiven(ConsoleCommand* command);
    92             static std::string getArgument(unsigned int index);
    93             static std::string getLastArgument();
     92            static const std::string& getArgument(unsigned int index);
     93            static const std::string& getLastArgument();
    9494
    9595            static void createListOfPossibleIdentifiers(const std::string& fragment);
     
    9999            static Identifier* getPossibleIdentifier(const std::string& name);
    100100            static ConsoleCommand* getPossibleCommand(const std::string& name, Identifier* identifier = 0);
    101             static std::string getPossibleArgument(const std::string& name, ConsoleCommand* command, unsigned int param);
     101            static const std::string& getPossibleArgument(const std::string& name, ConsoleCommand* command, unsigned int param);
    102102
    103103            static void createArgumentCompletionList(ConsoleCommand* command, unsigned int param);
Note: See TracChangeset for help on using the changeset viewer.