Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7282


Ignore:
Timestamp:
Aug 31, 2010, 2:26:53 AM (14 years ago)
Author:
landauf
Message:

ConsoleCommand::getCommand should return a const pointer

Location:
code/branches/consolecommands3/src/libraries/core/command
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/consolecommands3/src/libraries/core/command/CommandEvaluation.h

    r7238 r7282  
    6161                { return (this->execCommand_ != 0); }
    6262
    63             inline ConsoleCommand* getConsoleCommand() const
     63            inline const ConsoleCommand* getConsoleCommand() const
    6464                { return this->execCommand_; }
    6565
     
    9090            static std::string getCommonBegin(const ArgumentCompletionList& list);
    9191
    92             ConsoleCommand* execCommand_;
    93             ConsoleCommand* hintCommand_;
     92            const ConsoleCommand* execCommand_;
     93            const ConsoleCommand* hintCommand_;
    9494            SubString tokens_;
    9595            std::string string_;
  • code/branches/consolecommands3/src/libraries/core/command/ConsoleCommand.cc

    r7272 r7282  
    415415    }
    416416
    417     /* static */ ConsoleCommand* ConsoleCommand::getCommand(const std::string& group, const std::string& name, bool bPrintError)
     417    /* static */ const ConsoleCommand* ConsoleCommand::getCommand(const std::string& group, const std::string& name, bool bPrintError)
    418418    {
    419419        std::map<std::string, std::map<std::string, ConsoleCommand*> >::const_iterator it_group = ConsoleCommand::getCommandMap().find(group);
     
    436436    }
    437437
    438     /* static */ ConsoleCommand* ConsoleCommand::getCommandLC(const std::string& group, const std::string& name, bool bPrintError)
     438    /* static */ const ConsoleCommand* ConsoleCommand::getCommandLC(const std::string& group, const std::string& name, bool bPrintError)
    439439    {
    440440        std::string groupLC = getLowercase(group);
  • code/branches/consolecommands3/src/libraries/core/command/ConsoleCommand.h

    r7272 r7282  
    336336                { return ConsoleCommand::getCommandMapLC(); }
    337337
    338             static inline ConsoleCommand* getCommand(const std::string& name, bool bPrintError = false)
     338            static inline const ConsoleCommand* getCommand(const std::string& name, bool bPrintError = false)
    339339                { return ConsoleCommand::getCommand("", name, bPrintError); }
    340             static inline ConsoleCommand* getCommandLC(const std::string& name, bool bPrintError = false)
     340            static inline const ConsoleCommand* getCommandLC(const std::string& name, bool bPrintError = false)
    341341                { return ConsoleCommand::getCommandLC("", name, bPrintError); }
    342342
    343             static ConsoleCommand* getCommand(const std::string& group, const std::string& name, bool bPrintError = false);
    344             static ConsoleCommand* getCommandLC(const std::string& group, const std::string& name, bool bPrintError = false);
     343            static const ConsoleCommand* getCommand(const std::string& group, const std::string& name, bool bPrintError = false);
     344            static const ConsoleCommand* getCommandLC(const std::string& group, const std::string& name, bool bPrintError = false);
    345345
    346346            static void destroyAll();
  • code/branches/consolecommands3/src/libraries/core/command/TclThreadManager.h

    r7281 r7282  
    3838
    3939#include "util/Singleton.h"
    40 #include "core/OrxonoxClass.h"
    4140
    4241struct Tcl_Interp;
Note: See TracChangeset for help on using the changeset viewer.