Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/command/CommandExecutor.h

    r8858 r11071  
    113113            static int execute(const std::string& command, bool useTcl = true, bool printErrors = true); // tolua_export
    114114
    115             static MultiType queryMT(const std::string& command, int* error = 0, bool useTcl = true);
    116             static std::string query(const std::string& command, int* error = 0, bool useTcl = true); // tolua_export
     115            static MultiType queryMT(const std::string& command, int* error = nullptr, bool useTcl = true);
     116            static std::string query(const std::string& command, int* error = NULL, bool useTcl = true); // tolua_export
    117117
    118118            static CommandEvaluation evaluate(const std::string& command);
    119119
    120             static const int Success = 0;       ///< Error code for "success" (or no error)
    121             static const int Inexistent = 1;    ///< Error code if the command doesn't exist
    122             static const int Incomplete = 2;    ///< Error code if the command needs more arguments
    123             static const int Deactivated = 3;   ///< Error code if the command is not active
    124             static const int Denied = 4;        ///< Error code if the command needs a different access level
    125             static const int Error = 5;         ///< Error code if the command returned an error
     120            static constexpr int Success = 0;       ///< Error code for "success" (or no error)
     121            static constexpr int Inexistent = 1;    ///< Error code if the command doesn't exist
     122            static constexpr int Incomplete = 2;    ///< Error code if the command needs more arguments
     123            static constexpr int Deactivated = 3;   ///< Error code if the command is not active
     124            static constexpr int Denied = 4;        ///< Error code if the command needs a different access level
     125            static constexpr int Error = 5;         ///< Error code if the command returned an error
    126126
    127127            static std::string getErrorDescription(int error);
     
    132132
    133133        private:
    134             CommandExecutor() {}                            ///< Empty constructor
    135             CommandExecutor(const CommandExecutor& other);  ///< Not implemented copy-constructor
    136             ~CommandExecutor() {}                           ///< Empty destructor
     134            CommandExecutor() = default;                      ///< Empty constructor
     135            ~CommandExecutor() = default;                     ///< Empty destructor
     136
     137            // non-copyable:
     138            CommandExecutor(const CommandExecutor&) = delete;
     139            CommandExecutor& operator=(const CommandExecutor&) = delete;
    137140
    138141            static CommandExecutor& getInstance();
Note: See TracChangeset for help on using the changeset viewer.