Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 22, 2012, 9:35:54 PM (12 years ago)
Author:
landauf
Message:

removed const_cast and some const qualifiers from ConsoleCommand and -Manipulator

Location:
code/branches/presentation2012merge/src/libraries/core/command
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/src/libraries/core/command/ConsoleCommand.cc

    r8858 r9331  
    594594        @param bPrintError If true, an error is printed if the command doesn't exist
    595595    */
    596     /* static */ const ConsoleCommand* ConsoleCommand::getCommand(const std::string& group, const std::string& name, bool bPrintError)
     596    /* static */ ConsoleCommand* ConsoleCommand::getCommand(const std::string& group, const std::string& name, bool bPrintError)
    597597    {
    598598        // find the group
     
    624624        @param bPrintError If true, an error is printed if the command doesn't exist
    625625    */
    626     /* static */ const ConsoleCommand* ConsoleCommand::getCommandLC(const std::string& group, const std::string& name, bool bPrintError)
     626    /* static */ ConsoleCommand* ConsoleCommand::getCommandLC(const std::string& group, const std::string& name, bool bPrintError)
    627627    {
    628628        std::string groupLC = getLowercase(group);
  • code/branches/presentation2012merge/src/libraries/core/command/ConsoleCommand.h

    r8858 r9331  
    382382                public:
    383383                    /// Constructor: Creates a manipulator for a given ConsoleCommand.
    384                     ConsoleCommandManipulator(const ConsoleCommand* command) : command_(const_cast<ConsoleCommand*>(command)) {}
     384                    ConsoleCommandManipulator(ConsoleCommand* command) : command_(command) {}
    385385
    386386                    /// Changes the current function of the command. @param function The new function-pointer @param bForce If true, the new function-pointer is always assigned, even if the headers don't match
     
    619619
    620620            /// Returns a manipulator for this command.
    621             inline ConsoleCommandManipulator getManipulator() const
     621            inline ConsoleCommandManipulator getManipulator()
    622622                { return this; }
    623623
     
    667667
    668668            /// Returns a command (shortcut) with given name. @param name The name of the command shortcut @param bPrintError If true, an error is printed if the command doesn't exist
    669             static inline const ConsoleCommand* getCommand(const std::string& name, bool bPrintError = false)
     669            static inline ConsoleCommand* getCommand(const std::string& name, bool bPrintError = false)
    670670                { return ConsoleCommand::getCommand("", name, bPrintError); }
    671671            /// Returns a command (shortcut) with given name in lowercase. @param name The lowercase name of the command shortcut @param bPrintError If true, an error is printed if the command doesn't exist
    672             static inline const ConsoleCommand* getCommandLC(const std::string& name, bool bPrintError = false)
     672            static inline ConsoleCommand* getCommandLC(const std::string& name, bool bPrintError = false)
    673673                { return ConsoleCommand::getCommandLC("", name, bPrintError); }
    674674
    675             static const ConsoleCommand* getCommand(const std::string& group, const std::string& name, bool bPrintError = false);
    676             static const ConsoleCommand* getCommandLC(const std::string& group, const std::string& name, bool bPrintError = false);
     675            static ConsoleCommand* getCommand(const std::string& group, const std::string& name, bool bPrintError = false);
     676            static ConsoleCommand* getCommandLC(const std::string& group, const std::string& name, bool bPrintError = false);
    677677
    678678            static void destroyAll();
Note: See TracChangeset for help on using the changeset viewer.