Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3153 for code/branches


Ignore:
Timestamp:
Jun 13, 2009, 4:12:45 PM (15 years ago)
Author:
rgrieder
Message:

Small fixes.

Location:
code/branches/pch/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pch/src/OrxonoxConfig.h.in

    r3152 r3153  
    190190}
    191191
     192/* Just in case you don't include a standard header */
     193#ifndef NULL
     194  #define NULL 0
     195#endif
     196
    192197/* Visual Leak Detector looks for memory leaks */
    193198#cmakedefine VISUAL_LEAK_DETECTOR_ENABLE
  • code/branches/pch/src/orxonox/gui/GUIManager.cc

    r3143 r3153  
    271271        Returns false if the Overlay was already present.
    272272    */
    273     bool GUIManager::registerOverlay(std::string name, GUIOverlay* overlay)
     273    bool GUIManager::registerOverlay(const std::string& name, GUIOverlay* overlay)
    274274    {
    275275        return (this->guiOverlays_.insert(std::pair<std::string, GUIOverlay*>(name, overlay))).second;
     
    284284        Returns a pointer to the GUIOverlay.
    285285    */
    286     GUIOverlay* GUIManager::getOverlay(std::string name)
     286    GUIOverlay* GUIManager::getOverlay(const std::string& name)
    287287    {
    288288        return (this->guiOverlays_.find(name))->second;
  • code/branches/pch/src/orxonox/gui/GUIManager.h

    r3143 r3153  
    9191        void executeCode(const std::string& str);
    9292
    93         bool registerOverlay(std::string name, GUIOverlay* overlay); //!< Register a GUIOverlay with the GUIManager.
    94         GUIOverlay* getOverlay(std::string name); // Get the GUIOverlay of the GUI with the given name.
     93        bool registerOverlay(const std::string& name, GUIOverlay* overlay); //!< Register a GUIOverlay with the GUIManager.
     94        GUIOverlay* getOverlay(const std::string& name); // Get the GUIOverlay of the GUI with the given name.
    9595
    9696        void setCamera(Ogre::Camera* camera);
  • code/branches/pch/src/orxonox/tools/TextureGenerator.cc

    r3145 r3153  
    6565    unsigned int TextureGenerator::materialCount_s = 0;
    6666
    67     /*static*/ const std::string& TextureGenerator::getMaterialName(std::string textureName, const ColourValue& colour)
     67    /*static*/ const std::string& TextureGenerator::getMaterialName(const std::string& textureName, const ColourValue& colour)
    6868    {
    6969        std::map<ColourValue, std::string>& colourMap = materials_s[textureName];
  • code/branches/pch/src/orxonox/tools/TextureGenerator.h

    r3131 r3153  
    4646    {
    4747    public:
    48         static const std::string& getMaterialName(std::string textureName, const ColourValue& colour);
     48        static const std::string& getMaterialName(const std::string& textureName, const ColourValue& colour);
    4949
    5050    private:
  • code/branches/pch/src/util/ExprParser.h

    r2171 r3153  
    7272
    7373        ExprParser(const std::string& str);
    74         std::string& getRemains() { return  this->remains_; }
    75         double       getResult()  { return  this->result_; }
    76         bool         getSuccess() { return !this->failed_; }
     74        const std::string& getRemains() { return  this->remains_; }
     75        double             getResult()  { return  this->result_; }
     76        bool               getSuccess() { return !this->failed_; }
    7777
    7878    private:
  • code/branches/pch/src/util/OrxAssert.h

    r3149 r3153  
    4444#ifndef NDEBUG
    4545#define OrxAssert(Assertion, ErrorMessage) \
    46     Assertion ? ((void)0) : (void)(orxonox::OutputHandler::getOutStream().setOutputLevel(ORX_ERROR) << ErrorMessage << std::endl); \
     46    Assertion ? ((void)0) : (void)(orxonox::OutputHandler::getOutStream().setOutputLevel(1) << ErrorMessage << std::endl); \
    4747    assert(Assertion)
    4848#else
  • code/branches/pch/src/util/OutputHandler.h

    r2710 r3153  
    6363
    6464            /** @brief Puts some text on the outstream. @param text The text */
    65             static inline std::string log(const std::string& text)
     65            static inline const std::string& log(const std::string& text)
    6666                { OutputHandler::getOutStream().setOutputLevel(0); OutputHandler::getOutStream().output(text + "\n"); return text; }
    6767
    6868            /** @brief Puts an error on the outstream. @param text The text */
    69             static inline std::string error(const std::string& text)
     69            static inline const std::string& error(const std::string& text)
    7070                { OutputHandler::getOutStream().setOutputLevel(1); OutputHandler::getOutStream().output(text + "\n"); return text; }
    7171
    7272            /** @brief Puts a warning on the outstream. @param text The text */
    73             static inline std::string warning(const std::string& text)
     73            static inline const std::string& warning(const std::string& text)
    7474                { OutputHandler::getOutStream().setOutputLevel(2); OutputHandler::getOutStream().output(text + "\n"); return text; }
    7575
    7676            /** @brief Puts an info on the outstream. @param text The text */
    77             static inline std::string info(const std::string& text)
     77            static inline const std::string& info(const std::string& text)
    7878                { OutputHandler::getOutStream().setOutputLevel(3); OutputHandler::getOutStream().output(text + "\n"); return text; }
    7979
    8080            /** @brief Puts some debug output on the outstream. @param text The text */
    81             static inline std::string debug(const std::string& text)
     81            static inline const std::string& debug(const std::string& text)
    8282                { OutputHandler::getOutStream().setOutputLevel(4); OutputHandler::getOutStream().output(text + "\n"); return text; }
    8383
Note: See TracChangeset for help on using the changeset viewer.