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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/consolecommands3/src/libraries/util/OutputHandler.h

    r6105 r7190  
    104104
    105105            //! Writes to all output devices
    106             static inline const std::string& log(const std::string& text)
    107                 { OutputHandler::getOutStream(0).output(text) << std::endl; return text; }
     106            static inline void log(const std::string& text)
     107                { OutputHandler::getOutStream(0).output(text) << std::endl; }
    108108
    109109            //! Writes an error message to the output
    110             static inline const std::string& error(const std::string& text)
    111                 { OutputHandler::getOutStream(1).output(text) << std::endl; return text; }
     110            static inline void error(const std::string& text)
     111                { OutputHandler::getOutStream(1).output(text) << std::endl; }
    112112
    113113            //! Writes a warning message to the output
    114             static inline const std::string& warning(const std::string& text)
    115                 { OutputHandler::getOutStream(2).output(text) << std::endl; return text; }
     114            static inline void warning(const std::string& text)
     115                { OutputHandler::getOutStream(2).output(text) << std::endl; }
    116116
    117117            //! Writes an informational message to the output
    118             static inline const std::string& info(const std::string& text)
    119                 { OutputHandler::getOutStream(3).output(text) << std::endl; return text; }
     118            static inline void info(const std::string& text)
     119                { OutputHandler::getOutStream(3).output(text) << std::endl; }
    120120
    121121            //! Writes a debug message to the output
    122             static inline const std::string& debug(const std::string& text)
    123                 { OutputHandler::getOutStream(4).output(text) << std::endl; return text; }
     122            static inline void debug(const std::string& text)
     123                { OutputHandler::getOutStream(4).output(text) << std::endl; }
    124124
    125125            //! Registers an object that receives output via a provided std::ostream
Note: See TracChangeset for help on using the changeset viewer.