Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 4, 2015, 10:25:42 PM (9 years ago)
Author:
landauf
Message:

replace 'NULL' by 'nullptr'

Location:
code/branches/cpp11_v2/src/libraries/core/command
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.cc

    r10624 r10765  
    119119    /**
    120120        @brief Executes the command which was evaluated by this object and returns its return-value.
    121         @param error A pointer to an integer (or NULL) which will be used to write error codes to (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
     121        @param error A pointer to an integer (or nullptr) which will be used to write error codes to (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
    122122        @return Returns the result of the command (or MultiType::Null if there is no return value)
    123123    */
  • code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.h

    r8079 r10765  
    137137            static std::string getCommonBegin(const ArgumentCompletionList& list);
    138138
    139             const ConsoleCommand* execCommand_;             ///< The command that will be executed (can be NULL if the command is not valid)
     139            const ConsoleCommand* execCommand_;             ///< The command that will be executed (can be nullptr if the command is not valid)
    140140            const ConsoleCommand* hintCommand_;             ///< The command that is used to display hints and argument lists (can be different to execCommand_ in some cases)
    141141            SubString tokens_;                              ///< The single words of the command string, split into tokens
  • code/branches/cpp11_v2/src/libraries/core/command/CommandExecutor.cc

    r10624 r10765  
    8181        @brief Executes a command and returns its return-value.
    8282        @param command A string containing the command
    83         @param error A pointer to a value (or NULL) where the error-code should be written to (see @ref CommandExecutorErrorCodes "error codes")
     83        @param error A pointer to a value (or nullptr) where the error-code should be written to (see @ref CommandExecutorErrorCodes "error codes")
    8484        @param useTcl If true, the command is passed to tcl (see TclBind)
    8585        @return Returns the return-value of the command (if any - MultiType::Null otherwise)
     
    127127        @brief Executes a command and returns its return-value as string.
    128128        @param command A string containing the command
    129         @param error A pointer to a value (or NULL) where the error-code should be written to (see @ref CommandExecutorErrorCodes "error codes")
     129        @param error A pointer to a value (or nullptr) where the error-code should be written to (see @ref CommandExecutorErrorCodes "error codes")
    130130        @param useTcl If true, the command is passed to tcl (see TclBind)
    131131        @return Returns the return-value of the command converted to a string (or "" if there's no return value)
  • code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.cc

    r10624 r10765  
    348348
    349349    /**
    350         @brief Sets the functor to NULL (which also deactivates the command).
     350        @brief Sets the functor to nullptr (which also deactivates the command).
    351351    */
    352352    void ConsoleCommand::resetFunction()
  • code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommand.h

    r10624 r10765  
    195195                        { if (this->command_) { this->command_->popFunction(); } return *this; }
    196196
    197                     /// Sets the current function-pointer to NULL, which also deactivates the command.
     197                    /// Sets the current function-pointer to nullptr, which also deactivates the command.
    198198                    inline ConsoleCommandManipulator& resetFunction()
    199199                        { if (this->command_) { this->command_->resetFunction(); } return *this; }
     
    205205                    inline ConsoleCommandManipulator& pushObject(void* object)
    206206                        { if (this->command_) { this->command_->pushObject(object); } return *this; }
    207                     /// Removes the current object from the object-stack and restores the old object (or NULL if there's no object left on the stack).
     207                    /// Removes the current object from the object-stack and restores the old object (or nullptr if there's no object left on the stack).
    208208                    inline ConsoleCommandManipulator& popObject()
    209209                        { if (this->command_) { this->command_->popObject(); } return *this; }
  • code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommandIncludes.h

    r10624 r10765  
    331331        @brief Returns a manipulator for a command with the given name.
    332332
    333         @note If the command doesn't exist, the manipulator contains a NULL pointer to the command,
     333        @note If the command doesn't exist, the manipulator contains a nullptr to the command,
    334334        but it can still be used without checks, because all functions of ConsoleCommandManipulator
    335335        check internally if the command exists.
     
    340340        @brief Returns a manipulator for a command with the given group and name.
    341341
    342         @note If the command doesn't exist, the manipulator contains a NULL pointer to the command,
     342        @note If the command doesn't exist, the manipulator contains a nullptr to the command,
    343343        but it can still be used without checks, because all functions of ConsoleCommandManipulator
    344344        check internally if the command exists.
  • code/branches/cpp11_v2/src/libraries/core/command/Executor.cc

    r9550 r10765  
    7676        @brief Calls the wrapped function with arguments that are passed in a string.
    7777        @param arguments The arguments that should be passed to the function, separated by @a delimiter
    78         @param error A pointer to a variable (or NULL) that is used to store the error code (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
     78        @param error A pointer to a variable (or nullptr) that is used to store the error code (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
    7979        @param delimiter The delimiter that is used to separate the arguments in the string @a arguments
    8080        @param bPrintError If true, errors are printed to the console if the function couldn't be executed with the given arguments
     
    8989        @brief Calls the wrapped function with arguments that are passed as tokens in a SubString
    9090        @param arguments The arguments that should be passed to the function
    91         @param error A pointer to a variable (or NULL) that is used to store the error code (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
     91        @param error A pointer to a variable (or nullptr) that is used to store the error code (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
    9292        @param delimiter The delimiter that was used to separate the arguments in the SubString @a arguments (used to join the surplus arguments)
    9393        @param bPrintError If true, errors are printed to the console if the function couldn't be executed with the given arguments
     
    127127        @param arguments The arguments that should be converted
    128128        @param arg An array of MultiType where the converted arguments will be stored
    129         @param error A pointer to a variable (or NULL) that is used to store the error code (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
     129        @param error A pointer to a variable (or nullptr) that is used to store the error code (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
    130130        @param delimiter The delimiter that was used to separate the arguments in the SubString @a arguments (used to join the surplus arguments)
    131131        @return Returns the number of evaluated arguments
  • code/branches/cpp11_v2/src/libraries/core/command/Functor.h

    r9667 r10765  
    215215            virtual void* getRawObjectPointer() const = 0;
    216216
    217             /// Enables or disables the safe mode which causes the functor to change the object pointer to NULL if the object is deleted (only member functors).
     217            /// Enables or disables the safe mode which causes the functor to change the object pointer to nullptr if the object is deleted (only member functors).
    218218            virtual void setSafeMode(bool bSafeMode) = 0;
    219219
     
    245245            virtual ~FunctorMember() { if (this->bSafeMode_) { this->unregisterObject(this->object_); } }
    246246
    247             /// Calls the function-pointer with up to five arguments and an object. In case of a static-function, the object can be NULL. @return Returns the return-value of the function (if any; MultiType::Null otherwise)
     247            /// Calls the function-pointer with up to five arguments and an object. In case of a static-function, the object can be nullptr. @return Returns the return-value of the function (if any; MultiType::Null otherwise)
    248248            virtual MultiType operator()(O* object, const MultiType& param1 = MultiType::Null, const MultiType& param2 = MultiType::Null, const MultiType& param3 = MultiType::Null, const MultiType& param4 = MultiType::Null, const MultiType& param5 = MultiType::Null) = 0;
    249249
     
    312312                { this->object_ = 0; }
    313313
    314             O* object_;     ///< The stored object-pointer, used to execute a member-function (or NULL for static functions)
    315             bool bSafeMode_; ///< If true, the functor is in safe mode and registers itself as listener at the object and changes the pointer to NULL if the object is deleted
     314            O* object_;     ///< The stored object-pointer, used to execute a member-function (or nullptr for static functions)
     315            bool bSafeMode_; ///< If true, the functor is in safe mode and registers itself as listener at the object and changes the pointer to nullptr if the object is deleted
    316316    };
    317317
     
    324324            FunctorMember(void* object = 0) {}
    325325
    326             /// Calls the function-pointer with up to five arguments and an object. In case of a static-function, the object can be NULL. @return Returns the return-value of the function (if any; MultiType::Null otherwise)
     326            /// Calls the function-pointer with up to five arguments and an object. In case of a static-function, the object can be nullptr. @return Returns the return-value of the function (if any; MultiType::Null otherwise)
    327327            virtual MultiType operator()(void* object, const MultiType& param1 = MultiType::Null, const MultiType& param2 = MultiType::Null, const MultiType& param3 = MultiType::Null, const MultiType& param4 = MultiType::Null, const MultiType& param5 = MultiType::Null) = 0;
    328328
  • code/branches/cpp11_v2/src/libraries/core/command/IOConsolePOSIX.cc

    r9667 r10765  
    4444namespace orxonox
    4545{
    46     IOConsole* IOConsole::singletonPtr_s = NULL;
     46    IOConsole* IOConsole::singletonPtr_s = nullptr;
    4747
    4848    namespace EscapeMode
     
    353353        const char* s;
    354354        if (!this->terminalWidth_ && (s = getenv("COLUMNS")))
    355             this->terminalWidth_  = strtol(s, NULL, 10);
     355            this->terminalWidth_  = strtol(s, nullptr, 10);
    356356        if (!this->terminalWidth_)
    357357            this->terminalWidth_ = 80;
    358358        if (!this->terminalHeight_ && (s = getenv("LINES")))
    359             this->terminalHeight_ = strtol(s, NULL, 10);
     359            this->terminalHeight_ = strtol(s, nullptr, 10);
    360360        if (!this->terminalHeight_)
    361361            this->terminalHeight_ = 24;
  • code/branches/cpp11_v2/src/libraries/core/command/IOConsoleWindows.cc

    r9676 r10765  
    4141namespace orxonox
    4242{
    43     IOConsole* IOConsole::singletonPtr_s = NULL;
     43    IOConsole* IOConsole::singletonPtr_s = nullptr;
    4444
    4545    //! Redirects std::cout, creates the corresponding Shell and changes the terminal mode
     
    300300                this->terminalWidth_ - 1, this->inputLineRow_ + this->inputLineHeight_ + this->statusLines_ - 1);
    301301            this->inputLineRow_ += linesDown;
    302             ScrollConsoleScreenBuffer(stdOutHandle_, &oldRect, NULL, makeCOORD(0, this->inputLineRow_), &fillChar);
     302            ScrollConsoleScreenBuffer(stdOutHandle_, &oldRect, nullptr, makeCOORD(0, this->inputLineRow_), &fillChar);
    303303            // Move cursor down to the new bottom so the user can see the status lines
    304304            COORD pos = makeCOORD(0, this->inputLineRow_ + this->inputLineHeight_ - 1 + this->statusLines_);
     
    312312            // Scroll output up
    313313            SMALL_RECT oldRect = makeSMALL_RECT(0, lines - linesDown, this->terminalWidth_ - 1, this->inputLineRow_ - 1);
    314             ScrollConsoleScreenBuffer(stdOutHandle_, &oldRect, NULL, makeCOORD(0, 0), &fillChar);
     314            ScrollConsoleScreenBuffer(stdOutHandle_, &oldRect, nullptr, makeCOORD(0, 0), &fillChar);
    315315        }
    316316    }
     
    360360            SMALL_RECT oldRect = makeSMALL_RECT(0, statusLineRow, this->terminalWidth_ - 1, statusLineRow + this->statusLines_);
    361361            CHAR_INFO fillChar = {{' '}, FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED};
    362             ScrollConsoleScreenBuffer(stdOutHandle_, &oldRect, NULL, makeCOORD(0, statusLineRow + newLines), &fillChar);
     362            ScrollConsoleScreenBuffer(stdOutHandle_, &oldRect, nullptr, makeCOORD(0, statusLineRow + newLines), &fillChar);
    363363            // Clear potential leftovers
    364364            if (-newLines - this->statusLines_ > 0)
  • code/branches/cpp11_v2/src/libraries/core/command/TclBind.cc

    r10624 r10765  
    228228        @brief Executes Tcl-code and returns the return-value.
    229229        @param tclcode A string that contains Tcl-code
    230         @param error A pointer to an integer (or NULL) that is used to write an error-code (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
     230        @param error A pointer to an integer (or nullptr) that is used to write an error-code (see @ref CommandExecutorErrorCodes "CommandExecutor error codes")
    231231        @return Returns the return-value of the executed code (or an empty string if there's no return-value)
    232232    */
Note: See TracChangeset for help on using the changeset viewer.