Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 19, 2010, 5:48:01 PM (14 years ago)
Author:
landauf
Message:

removed unnecessary return values from console commands "log", "error", "warning", "info", and "debug"
removed return value from console command Chat (the non-static chat functions still return a bool)
config and tconfig don't return a bool anymore but instead print an error if the config value doesn't exist.

fixed console command "printRTT" - it shouldn't crash on a standalone system.

Location:
code/branches/consolecommands3/src/libraries/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/consolecommands3/src/libraries/core/ConfigFileManager.cc

    r7163 r7190  
    543543    }
    544544
    545     bool SettingsConfigFile::config(const std::string& section, const std::string& entry, const std::string& value)
    546     {
    547         return this->configImpl(section, entry, value, &ConfigValueContainer::set);
    548     }
    549 
    550     bool SettingsConfigFile::tconfig(const std::string& section, const std::string& entry, const std::string& value)
    551     {
    552         return this->configImpl(section, entry, value, &ConfigValueContainer::tset);
     545    void SettingsConfigFile::config(const std::string& section, const std::string& entry, const std::string& value)
     546    {
     547        if (!this->configImpl(section, entry, value, &ConfigValueContainer::set))
     548            COUT(1) << "Error: Config value \"" << entry << "\" in section \"" << section << "\" doesn't exist." << std::endl;
     549    }
     550
     551    void SettingsConfigFile::tconfig(const std::string& section, const std::string& entry, const std::string& value)
     552    {
     553        if (!this->configImpl(section, entry, value, &ConfigValueContainer::tset))
     554            COUT(1) << "Error: Config value \"" << entry << "\" in section \"" << section << "\" doesn't exist." << std::endl;
    553555    }
    554556
  • code/branches/consolecommands3/src/libraries/core/ConfigFileManager.h

    r7163 r7190  
    331331            void clean(bool bCleanComments = false); // tolua_export
    332332
    333             bool config(const std::string& section, const std::string& entry, const std::string& value); // tolua_export
    334             bool tconfig(const std::string& section, const std::string& entry, const std::string& value); // tolua_export
     333            void config(const std::string& section, const std::string& entry, const std::string& value); // tolua_export
     334            void tconfig(const std::string& section, const std::string& entry, const std::string& value); // tolua_export
    335335            std::string getConfig(const std::string& section, const std::string& entry); // tolua_export
    336336
Note: See TracChangeset for help on using the changeset viewer.