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
Files:
55 edited

Legend:

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

    r10624 r10765  
    8484        // get executable module
    8585        TCHAR buffer[1024];
    86         if (GetModuleFileName(NULL, buffer, 1024) == 0)
     86        if (GetModuleFileName(nullptr, buffer, 1024) == 0)
    8787            ThrowException(General, "Could not retrieve executable path.");
    8888
  • code/branches/cpp11_v2/src/libraries/core/BaseObject.cc

    r10624 r10765  
    205205            Template* link;
    206206            assert(!(link = Template::getTemplate(temp->getLink())) || !link->isLink());
    207             link = NULL;
     207            link = nullptr;
    208208        }
    209209        else
  • code/branches/cpp11_v2/src/libraries/core/BaseObject.h

    r10624 r10765  
    265265            return this->weakPtr_;
    266266        else
    267             return NULL;
     267            return nullptr;
    268268    }
    269269
  • code/branches/cpp11_v2/src/libraries/core/ConfigurablePaths.cc

    r10624 r10765  
    122122            char* userDataPathPtr(getenv("APPDATA"));
    123123#endif
    124             if (userDataPathPtr == NULL)
     124            if (userDataPathPtr == nullptr)
    125125                ThrowException(General, "Could not retrieve user data path.");
    126126            bf::path userDataPath(userDataPathPtr);
  • code/branches/cpp11_v2/src/libraries/core/Core.cc

    r10624 r10765  
    9595
    9696    Core::Core(const std::string& cmdLine)
    97         : applicationPaths_(NULL)
    98         , configurablePaths_(NULL)
    99         , dynLibManager_(NULL)
    100         , signalHandler_(NULL)
    101         , configFileManager_(NULL)
    102         , languageInstance_(NULL)
    103         , loaderInstance_(NULL)
    104         , ioConsole_(NULL)
    105         , tclBind_(NULL)
    106         , tclThreadManager_(NULL)
    107         , rootScope_(NULL)
    108         , graphicsManager_(NULL)
    109         , inputManager_(NULL)
    110         , guiManager_(NULL)
    111         , graphicsScope_(NULL)
     97        : applicationPaths_(nullptr)
     98        , configurablePaths_(nullptr)
     99        , dynLibManager_(nullptr)
     100        , signalHandler_(nullptr)
     101        , configFileManager_(nullptr)
     102        , languageInstance_(nullptr)
     103        , loaderInstance_(nullptr)
     104        , ioConsole_(nullptr)
     105        , tclBind_(nullptr)
     106        , tclThreadManager_(nullptr)
     107        , rootScope_(nullptr)
     108        , graphicsManager_(nullptr)
     109        , inputManager_(nullptr)
     110        , guiManager_(nullptr)
     111        , graphicsScope_(nullptr)
    112112        , bGraphicsLoaded_(false)
    113         , staticInitHandler_(NULL)
    114         , pluginManager_(NULL)
    115         , rootModule_(NULL)
    116         , config_(NULL)
     113        , staticInitHandler_(nullptr)
     114        , pluginManager_(nullptr)
     115        , rootModule_(nullptr)
     116        , config_(nullptr)
    117117        , destructionHelper_(this)
    118118    {
     
    176176
    177177        // initialize root context
    178         Context::setRootContext(new Context(NULL));
     178        Context::setRootContext(new Context(nullptr));
    179179
    180180        // Do this soon after the ConfigFileManager has been created to open up the
     
    326326        module->deleteAllStaticallyInitializedInstances();
    327327        this->dynLibManager_->unload(module->getDynLib());
    328         module->setDynLib(NULL);
     328        module->setDynLib(nullptr);
    329329    }
    330330
     
    471471        }
    472472        // Process console events and status line
    473         if (this->ioConsole_ != NULL)
     473        if (this->ioConsole_ != nullptr)
    474474            this->ioConsole_->preUpdate(time);
    475475        // Process thread commands
  • code/branches/cpp11_v2/src/libraries/core/CoreConfig.cc

    r10624 r10765  
    137137    void CoreConfig::updateLastLevelTimestamp()
    138138    {
    139         ModifyConfigValue(lastLevelTimestamp_, set, static_cast<long long>(time(NULL)));
     139        ModifyConfigValue(lastLevelTimestamp_, set, static_cast<long long>(time(nullptr)));
    140140    }
    141141
    142142    void CoreConfig::updateOgreConfigTimestamp()
    143143    {
    144         ModifyConfigValue(ogreConfigTimestamp_, set, static_cast<long long>(time(NULL)));
     144        ModifyConfigValue(ogreConfigTimestamp_, set, static_cast<long long>(time(nullptr)));
    145145    }
    146146
  • code/branches/cpp11_v2/src/libraries/core/CoreIncludes.h

    r10624 r10765  
    120120*/
    121121#define RegisterAbstractClass(ClassName) \
    122     RegisterClassWithFactory(ClassName, static_cast<ClassFactory<ClassName>*>(NULL), false)
     122    RegisterClassWithFactory(ClassName, static_cast<ClassFactory<ClassName>*>(nullptr), false)
    123123
    124124/**
  • code/branches/cpp11_v2/src/libraries/core/GUIManager.cc

    r10624 r10765  
    268268    */
    269269    GUIManager::GUIManager(const std::pair<int, int>& mousePosition)
    270         : guiRenderer_(NULL)
    271         , resourceProvider_(NULL)
     270        : guiRenderer_(nullptr)
     271        , resourceProvider_(nullptr)
    272272#ifndef ORXONOX_OLD_CEGUI
    273         , rqListener_(NULL)
    274         , imageCodec_(NULL)
    275 #endif
    276         , luaState_(NULL)
    277         , scriptModule_(NULL)
    278         , guiSystem_(NULL)
    279         , ceguiLogger_(NULL)
    280         , rootWindow_(NULL)
    281         , hudRootWindow_(NULL)
    282         , menuRootWindow_(NULL)
    283         , camera_(NULL)
     273        , rqListener_(nullptr)
     274        , imageCodec_(nullptr)
     275#endif
     276        , luaState_(nullptr)
     277        , scriptModule_(nullptr)
     278        , guiSystem_(nullptr)
     279        , ceguiLogger_(nullptr)
     280        , rootWindow_(nullptr)
     281        , hudRootWindow_(nullptr)
     282        , menuRootWindow_(nullptr)
     283        , camera_(nullptr)
    284284        , destructionHelper_(this)
    285285    {
     
    467467    {
    468468#ifdef ORXONOX_OLD_CEGUI
    469         if (camera == NULL)
     469        if (camera == nullptr)
    470470            this->guiRenderer_->setTargetSceneManager(0);
    471471        else
    472472            this->guiRenderer_->setTargetSceneManager(camera->getSceneManager());
    473473#else
    474         if (camera_ != NULL && camera_->getSceneManager() != NULL)
     474        if (camera_ != nullptr && camera_->getSceneManager() != nullptr)
    475475            camera_->getSceneManager()->removeRenderQueueListener(rqListener_);
    476         if (camera != NULL && camera->getSceneManager() != NULL)
     476        if (camera != nullptr && camera->getSceneManager() != nullptr)
    477477            camera->getSceneManager()->addRenderQueueListener(rqListener_);
    478478#endif
     
    876876            return;
    877877
    878         CEGUI::Font* font = NULL;
     878        CEGUI::Font* font = nullptr;
    879879        CEGUI::XMLAttributes xmlAttributes;
    880880
     
    892892
    893893        font = CEGUI::FontManager::getSingleton().createFont("FreeType", xmlAttributes);
    894         if(font != NULL)
     894        if(font != nullptr)
    895895            font->load();
    896896#else
  • code/branches/cpp11_v2/src/libraries/core/Game.cc

    r10624 r10765  
    7777
    7878    Game::Game(const std::string& cmdLine)
    79         : gameClock_(NULL)
    80         , core_(NULL)
     79        : gameClock_(nullptr)
     80        , core_(nullptr)
    8181        , bChangingState_(false)
    8282        , bAbort_(false)
    83         , config_(NULL)
     83        , config_(nullptr)
    8484        , destructionHelper_(this)
    8585    {
     
    398398            // Check parent and all its grand parents
    399399            shared_ptr<GameStateTreeNode> currentNode = lastRequestedNode;
    400             while (currentNode != NULL)
     400            while (currentNode != nullptr)
    401401            {
    402402                if (currentNode->name_ == name)
     
    405405                requestedNodes.push_back(currentNode);
    406406            }
    407             if (currentNode == NULL)
     407            if (currentNode == nullptr)
    408408                requestedNodes.clear();
    409409        }
  • code/branches/cpp11_v2/src/libraries/core/GraphicsManager.cc

    r10624 r10765  
    178178    void GraphicsManager::upgradeToGraphics()
    179179    {
    180         if (renderWindow_ != NULL)
     180        if (renderWindow_ != nullptr)
    181181            return;
    182182
  • code/branches/cpp11_v2/src/libraries/core/GraphicsManager.h

    r10624 r10765  
    9696        void loadDebugOverlay();
    9797        void unloadDebugOverlay();
    98         bool rendererLoaded() const { return renderWindow_ != NULL; }
     98        bool rendererLoaded() const { return renderWindow_ != nullptr; }
    9999
    100100        void setCamera(Ogre::Camera* camera);
  • code/branches/cpp11_v2/src/libraries/core/Loader.cc

    r10624 r10765  
    8989        {
    9090            shared_ptr<ResourceInfo> info = Resource::getInfo(file->getFilename());
    91             if (info == NULL)
     91            if (info == nullptr)
    9292            {
    9393                orxout(user_error, context::loader) << "Could not find XML file '" << file->getFilename() << "'." << endl;
  • code/branches/cpp11_v2/src/libraries/core/LuaState.cc

    r10265 r10765  
    4848    LuaState::LuaState()
    4949        : bIsRunning_(false)
    50         , includeParseFunction_(NULL)
     50        , includeParseFunction_(nullptr)
    5151    {
    5252        // Create new lua state and configure it
     
    8484        shared_ptr<ResourceInfo> sourceInfo = Resource::getInfo(sourceFileInfo_->path + filename);
    8585        // Continue search in root directories
    86         if (sourceInfo == NULL && !sourceFileInfo_->path.empty())
     86        if (sourceInfo == nullptr && !sourceFileInfo_->path.empty())
    8787            sourceInfo = Resource::getInfo(filename);
    8888        return sourceInfo;
     
    9292    {
    9393        shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename);
    94         if (sourceInfo != NULL)
     94        if (sourceInfo != nullptr)
    9595            return this->includeString(Resource::open(sourceInfo)->getAsString(), sourceInfo);
    9696        else
     
    105105        // Parse string with provided include parser (otherwise don't preparse at all)
    106106        std::string luaInput;
    107         if (includeParseFunction_ != NULL)
     107        if (includeParseFunction_ != nullptr)
    108108            luaInput = (*includeParseFunction_)(code);
    109109        else
    110110            luaInput = code;
    111111
    112         if (sourceFileInfo != NULL)
     112        if (sourceFileInfo != nullptr)
    113113        {
    114114            // Also fill a map with the actual source code. This is just for the include* commands
     
    119119        bool returnValue = this->doString(luaInput, sourceFileInfo);
    120120
    121         if (sourceFileInfo != NULL)
     121        if (sourceFileInfo != nullptr)
    122122        {
    123123            // Delete source code entry
    124             if (sourceFileInfo != NULL)
     124            if (sourceFileInfo != nullptr)
    125125                this->sourceCodeMap_.erase(sourceFileInfo->filename);
    126126        }
     
    132132    {
    133133        shared_ptr<ResourceInfo> sourceInfo = this->getFileInfo(filename);
    134         if (sourceInfo != NULL)
     134        if (sourceInfo != nullptr)
    135135            return this->doString(Resource::open(sourceInfo)->getAsString(), sourceInfo);
    136136        else
     
    146146        shared_ptr<ResourceInfo> oldSourceFileInfo = sourceFileInfo_;
    147147        // Only override if sourceFileInfo provides useful information
    148         if (sourceFileInfo != NULL)
     148        if (sourceFileInfo != nullptr)
    149149            sourceFileInfo_ = sourceFileInfo;
    150150
    151151        std::string chunkname;
    152         if (sourceFileInfo != NULL)
     152        if (sourceFileInfo != nullptr)
    153153        {
    154154            // Provide lua_load with the filename for debug purposes
     
    286286    {
    287287        shared_ptr<ResourceInfo> info = this->getFileInfo(filename);
    288         if (info == NULL)
     288        if (info == nullptr)
    289289            return false;
    290290        else
     
    301301            return it->second;
    302302        shared_ptr<ResourceInfo> info = Resource::getInfo(filename);
    303         if (info == NULL)
     303        if (info == nullptr)
    304304            return "";
    305305        else
  • code/branches/cpp11_v2/src/libraries/core/Resource.cc

    r9675 r10765  
    102102                ptr->size = it->uncompressedSize;
    103103#if OGRE_VERSION >= 0x010800
    104                 if (dynamic_cast<const Ogre::FileSystemArchive*>(it->archive) != NULL)
     104                if (dynamic_cast<const Ogre::FileSystemArchive*>(it->archive) != nullptr)
    105105#else
    106                 if (dynamic_cast<Ogre::FileSystemArchive*>(it->archive) != NULL)
     106                if (dynamic_cast<Ogre::FileSystemArchive*>(it->archive) != nullptr)
    107107#endif
    108108                {
  • code/branches/cpp11_v2/src/libraries/core/class/Identifiable.h

    r9667 r10765  
    9898                registered in the class hierarchy.
    9999            @return
    100                 Returns NULL if the no pointer was found.
     100                Returns nullptr if the no pointer was found.
    101101            */
    102102            ORX_FORCEINLINE void* getDerivedPointer(unsigned int classID)
     
    107107                        return this->objectPointers_[i].second;
    108108                }
    109                 return NULL;
     109                return nullptr;
    110110            }
    111111
  • code/branches/cpp11_v2/src/libraries/core/class/Identifier.h

    r10624 r10765  
    279279            ClassIdentifier(const std::string& name, Factory* factory, bool bLoadable) : Identifier(name, factory, bLoadable)
    280280            {
    281                 OrxVerify(ClassIdentifier<T>::classIdentifier_s == NULL, "Assertion failed in ClassIdentifier of type " << typeid(T).name());
     281                OrxVerify(ClassIdentifier<T>::classIdentifier_s == nullptr, "Assertion failed in ClassIdentifier of type " << typeid(T).name());
    282282                ClassIdentifier<T>::classIdentifier_s = this;
    283283
     
    334334    /*static*/ inline ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
    335335    {
    336         if (ClassIdentifier<T>::classIdentifier_s == NULL)
     336        if (ClassIdentifier<T>::classIdentifier_s == nullptr)
    337337            ClassIdentifier<T>::classIdentifier_s = (ClassIdentifier<T>*) IdentifierManager::getInstance().getIdentifierByTypeInfo(typeid(T));
    338338
    339         OrxVerify(ClassIdentifier<T>::classIdentifier_s != NULL, "Did you forget to register the class of type " << typeid(T).name() << "?");
     339        OrxVerify(ClassIdentifier<T>::classIdentifier_s != nullptr, "Did you forget to register the class of type " << typeid(T).name() << "?");
    340340        return ClassIdentifier<T>::classIdentifier_s;
    341341    }
     
    451451    void ClassIdentifier<T>::updateConfigValues(bool updateChildren) const
    452452    {
    453         this->updateConfigValues(updateChildren, static_cast<T*>(NULL));
     453        this->updateConfigValues(updateChildren, static_cast<T*>(nullptr));
    454454    }
    455455
     
    483483        registered in the class hierarchy.
    484484    @return
    485         Returns NULL if the cast is not possible
     485        Returns nullptr if the cast is not possible
    486486    @note
    487         In case of NULL return (and using MSVC), a dynamic_cast might still be possible if
     487        In case of nullptr return (and using MSVC), a dynamic_cast might still be possible if
    488488        a class forgot to register its objects.
    489489        Also note that the function is implemented differently for GCC/MSVC.
     
    494494#ifdef ORXONOX_COMPILER_MSVC
    495495        typedef Loki::TypeTraits<typename Loki::TypeTraits<T>::PointeeType>::NonConstType ClassType;
    496         if (source != NULL)
     496        if (source != nullptr)
    497497            return source->template getDerivedPointer<ClassType>(ClassIdentifier<ClassType>::getIdentifier()->getClassID());
    498498        else
    499             return NULL;
     499            return nullptr;
    500500#else
    501501        return dynamic_cast<T>(source);
  • code/branches/cpp11_v2/src/libraries/core/class/IdentifierManager.cc

    r10624 r10765  
    4949    {
    5050        this->hierarchyCreatingCounter_s = 0;
    51         this->recordTraceForIdentifier_ = NULL;
     51        this->recordTraceForIdentifier_ = nullptr;
    5252    }
    5353
     
    9292        // iterate over all identifiers, create one instance of each class and initialize the identifiers
    9393        {
    94             Context temporaryContext(NULL);
     94            Context temporaryContext(nullptr);
    9595            for (std::set<Identifier*>::const_iterator it = this->identifiers_.begin(); it != this->identifiers_.end(); ++it)
    9696            {
     
    108108                    Identifiable* temp = identifier->fabricate(&temporaryContext);
    109109
    110                     this->recordTraceForIdentifier_ = NULL;
     110                    this->recordTraceForIdentifier_ = nullptr;
    111111
    112112                    if (temp->getIdentifier() != identifier)
     
    149149
    150150        // for all initialized identifiers, check if a sample instance behaves as expected according to the class hierarchy
    151         Context temporaryContext(NULL);
     151        Context temporaryContext(nullptr);
    152152        for (std::set<Identifier*>::const_iterator it1 = initializedIdentifiers.begin(); it1 != initializedIdentifiers.end(); ++it1)
    153153        {
  • code/branches/cpp11_v2/src/libraries/core/class/SubclassIdentifier.h

    r9667 r10765  
    127127                    else
    128128                    {
    129                         orxout(internal_error) << "Can't assign NULL identifier" << endl;
     129                        orxout(internal_error) << "Can't assign nullptr identifier" << endl;
    130130                    }
    131131                }
  • 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    */
  • code/branches/cpp11_v2/src/libraries/core/config/ConfigFile.cc

    r10733 r10765  
    275275
    276276    /**
    277         @brief Returns a pointer to the section with given name (or NULL if the section doesn't exist).
     277        @brief Returns a pointer to the section with given name (or nullptr if the section doesn't exist).
    278278    */
    279279    ConfigFileSection* ConfigFile::getSection(const std::string& section) const
     
    282282            if ((*it)->getName() == section)
    283283                return (*it);
    284         return NULL;
     284        return nullptr;
    285285    }
    286286
  • code/branches/cpp11_v2/src/libraries/core/config/ConfigFileManager.cc

    r9559 r10765  
    4444    ConfigFileManager* ConfigFileManager::singletonPtr_s = 0;
    4545
    46     /// Constructor: Initializes the array of config files with NULL.
     46    /// Constructor: Initializes the array of config files with nullptr.
    4747    ConfigFileManager::ConfigFileManager()
    4848    {
    49         this->configFiles_.assign(NULL);
     49        this->configFiles_.assign(nullptr);
    5050    }
    5151
  • code/branches/cpp11_v2/src/libraries/core/config/ConfigFileSection.cc

    r9559 r10765  
    9999
    100100    /**
    101         @brief Returns the entry with given name (or NULL if it doesn't exist).
     101        @brief Returns the entry with given name (or nullptr if it doesn't exist).
    102102
    103103        @param name     The name of the entry
     
    110110                return *it;
    111111        }
    112         return NULL;
     112        return nullptr;
    113113    }
    114114
    115115    /**
    116         @brief Returns the entry of a vector element with given name and index (or NULL if it doesn't exist).
     116        @brief Returns the entry of a vector element with given name and index (or nullptr if it doesn't exist).
    117117
    118118        @param name     The name of the vector
     
    126126                return *it;
    127127        }
    128         return NULL;
     128        return nullptr;
    129129    }
    130130
  • code/branches/cpp11_v2/src/libraries/core/config/ConfigValueContainer.h

    r9667 r10765  
    223223            inline const std::string& getSectionName() const
    224224                { return this->sectionname_; }
    225             /// Returns the associated identifier (can be NULL).
     225            /// Returns the associated identifier (can be nullptr).
    226226            inline Identifier* getIdentifier() const
    227227                { return this->identifier_; }
  • code/branches/cpp11_v2/src/libraries/core/config/SettingsConfigFile.cc

    r10624 r10765  
    106106    void SettingsConfigFile::addConfigValueContainer(ConfigValueContainer* container)
    107107    {
    108         if (container == NULL)
     108        if (container == nullptr)
    109109            return;
    110110        std::pair<std::string, ConfigValueContainer*> second(getLowercase(container->getName()), container);
     
    118118    void SettingsConfigFile::removeConfigValueContainer(ConfigValueContainer* container)
    119119    {
    120         if (container == NULL)
     120        if (container == nullptr)
    121121            return;
    122122        const std::string& sectionLC = getLowercase(container->getSectionName());
     
    269269            {
    270270                std::string value;
    271                 it->second.second->getValue<std::string, void>(&value, NULL);
     271                it->second.second->getValue<std::string, void>(&value, nullptr);
    272272                return value;
    273273            }
  • code/branches/cpp11_v2/src/libraries/core/input/InputManager.cc

    r10624 r10765  
    210210        catch (const std::exception& ex)
    211211        {
    212             oisInputManager_ = NULL;
     212            oisInputManager_ = nullptr;
    213213            internalState_ |= Bad;
    214214            ThrowException(InitialisationFailed, "Could not initialise the input system: " << ex.what());
     
    312312        BOOST_FOREACH(InputDevice*& device, devices_)
    313313        {
    314             if (device == NULL)
     314            if (device == nullptr)
    315315                continue;
    316316            const std::string& className = device->getClassName();
     
    321321        devices_.resize(InputDeviceEnumerator::FirstJoyStick);
    322322
    323         assert(oisInputManager_ != NULL);
     323        assert(oisInputManager_ != nullptr);
    324324        try
    325325        {
     
    331331                                                   << "Potential resource leak!" << endl;
    332332        }
    333         oisInputManager_ = NULL;
     333        oisInputManager_ = nullptr;
    334334
    335335        internalState_ |= Bad;
     
    388388        // No event gets triggered here yet!
    389389        BOOST_FOREACH(InputDevice* device, devices_)
    390             if (device != NULL)
     390            if (device != nullptr)
    391391                device->update(time);
    392392
     
    419419        for (unsigned int i = 0; i < devices_.size(); ++i)
    420420        {
    421             if (devices_[i] == NULL)
     421            if (devices_[i] == nullptr)
    422422                continue;
    423423            std::vector<InputState*>& states = devices_[i]->getStateListRef();
     
    439439        std::set<InputState*> tempSet;
    440440        for (unsigned int i = 0; i < devices_.size(); ++i)
    441             if (devices_[i] != NULL)
     441            if (devices_[i] != nullptr)
    442442                for (unsigned int iState = 0; iState < devices_[i]->getStateListRef().size(); ++iState)
    443443                    tempSet.insert(devices_[i]->getStateListRef()[iState]);
     
    467467    {
    468468        BOOST_FOREACH(InputDevice* device, devices_)
    469             if (device != NULL)
     469            if (device != nullptr)
    470470                device->clearBuffers();
    471471    }
     
    477477
    478478        BOOST_FOREACH(InputDevice* device, devices_)
    479             if (device != NULL)
     479            if (device != nullptr)
    480480                device->startCalibration();
    481481
     
    488488    {
    489489        BOOST_FOREACH(InputDevice* device, devices_)
    490             if (device != NULL)
     490            if (device != nullptr)
    491491                device->stopCalibration();
    492492
     
    509509    {
    510510        Mouse* mouse = static_cast<Mouse*>(devices_[InputDeviceEnumerator::Mouse]);
    511         if (mouse != NULL)
     511        if (mouse != nullptr)
    512512        {
    513513            const OIS::MouseState state = mouse->getOISDevice()->getMouseState();
  • code/branches/cpp11_v2/src/libraries/core/input/InputManager.h

    r8729 r10765  
    134134            Returns a pointer to a InputState referenced by name.
    135135        @return
    136             Returns NULL if state was not found.
     136            Returns nullptr if state was not found.
    137137        */
    138138        InputState* getState(const std::string& name);
  • code/branches/cpp11_v2/src/libraries/core/input/InputState.cc

    r8729 r10765  
    4949            priority_ = 0;
    5050
    51         handlers_.resize(InputDeviceEnumerator::FirstJoyStick + this->getJoyStickList().size(), NULL);
     51        handlers_.resize(InputDeviceEnumerator::FirstJoyStick + this->getJoyStickList().size(), nullptr);
    5252    }
    5353
     
    5555    {
    5656        if (device < handlers_.size())
    57             return handlers_[device] != NULL;
     57            return handlers_[device] != nullptr;
    5858        else
    5959            return false;
     
    6464    {
    6565        unsigned int oldSize = handlers_.size();
    66         handlers_.resize(InputDeviceEnumerator::FirstJoyStick + joyStickList.size(), NULL);
     66        handlers_.resize(InputDeviceEnumerator::FirstJoyStick + joyStickList.size(), nullptr);
    6767
    6868        for (unsigned int i = oldSize; i < handlers_.size(); ++i)
  • code/branches/cpp11_v2/src/libraries/core/input/InputState.h

    r8729 r10765  
    179179    {
    180180        for (unsigned int i = 0; i < handlers_.size(); ++i)
    181             if (handlers_[i] != NULL)
     181            if (handlers_[i] != nullptr)
    182182                INPUT_STATE_PUSH_CALL(i, allDevicesUpdated, dt);
    183183    }
     
    188188        {
    189189        case InputDeviceEnumerator::Keyboard:
    190             if (handlers_[keyboardIndex_s] != NULL)
     190            if (handlers_[keyboardIndex_s] != nullptr)
    191191                INPUT_STATE_PUSH_CALL(keyboardIndex_s, keyboardUpdated, dt);
    192192            break;
    193193
    194194        case InputDeviceEnumerator::Mouse:
    195             if (handlers_[mouseIndex_s] != NULL)
     195            if (handlers_[mouseIndex_s] != nullptr)
    196196                INPUT_STATE_PUSH_CALL(mouseIndex_s, mouseUpdated, dt);
    197197            break;
    198198
    199199        default: // joy sticks
    200             if (handlers_[device] != NULL)
     200            if (handlers_[device] != nullptr)
    201201                INPUT_STATE_PUSH_CALL(device, joyStickUpdated, device - firstJoyStickIndex_s, dt);
    202202            break;
     
    208208    {
    209209        assert(device < handlers_.size());
    210         if (handlers_[device] != NULL)
     210        if (handlers_[device] != nullptr)
    211211        {
    212212            // We have to store the function pointer to tell the compiler about its actual type because of overloading
     
    218218    ORX_FORCEINLINE void InputState::mouseMoved(IntVector2 abs, IntVector2 rel, IntVector2 clippingSize)
    219219    {
    220         if (handlers_[mouseIndex_s] != NULL)
     220        if (handlers_[mouseIndex_s] != nullptr)
    221221            INPUT_STATE_PUSH_CALL(mouseIndex_s, mouseMoved, abs, rel, clippingSize);
    222222    }
     
    224224    ORX_FORCEINLINE void InputState::mouseScrolled(int abs, int rel)
    225225    {
    226         if (handlers_[mouseIndex_s] != NULL)
     226        if (handlers_[mouseIndex_s] != nullptr)
    227227            INPUT_STATE_PUSH_CALL(mouseIndex_s, mouseScrolled, abs, rel);
    228228    }
     
    231231    {
    232232        assert(device < handlers_.size());
    233         if (handlers_[device] != NULL)
     233        if (handlers_[device] != nullptr)
    234234            INPUT_STATE_PUSH_CALL(device, axisMoved, device - firstJoyStickIndex_s, axis, value);
    235235    }
  • code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.cc

    r10624 r10765  
    5353        : deriveTime_(0.0f)
    5454        , filename_(filename)
    55         , configFile_(NULL)
    56         , fallbackConfigFile_(NULL)
     55        , configFile_(nullptr)
     56        , fallbackConfigFile_(nullptr)
    5757    {
    5858        mouseRelative_[0] = 0;
     
    170170
    171171        // load the bindings if required
    172         if (configFile_ != NULL)
     172        if (configFile_ != nullptr)
    173173        {
    174174            for (unsigned int iDev = oldValue; iDev < joySticks_.size(); ++iDev)
  • code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.h

    r9978 r10765  
    159159        //! Name of the file used in this KeyBinder (constant!)
    160160        const std::string filename_;
    161         //! Config file used. NULL in case of KeyDetector. Also indicates whether we've already loaded.
     161        //! Config file used. nullptr in case of KeyDetector. Also indicates whether we've already loaded.
    162162        ConfigFile* configFile_;
    163163        //! Config file from the data directory that only serves as fallback
  • code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.cc

    r10624 r10765  
    5656
    5757    KeyBinderManager::KeyBinderManager()
    58         : currentBinder_(NULL)
     58        : currentBinder_(nullptr)
    5959        , bDefaultFileLoaded_(true)
    6060        , bBinding_(false)
  • code/branches/cpp11_v2/src/libraries/core/input/KeyBinderManager.h

    r9667 r10765  
    107107
    108108        // KeyBinder management
    109         KeyBinder* currentBinder_;                   //! Currently selected KeyBinder (never NULL!)
     109        KeyBinder* currentBinder_;                   //! Currently selected KeyBinder (never nullptr!)
    110110        std::map<std::string, KeyBinder*> binders_;  //! All loaded KeyBinders
    111111        bool bDefaultFileLoaded_;                    //! Tells whether the default one is loaded
  • code/branches/cpp11_v2/src/libraries/core/input/KeyDetector.cc

    r10624 r10765  
    6262    KeyDetector::~KeyDetector()
    6363    {
    64         inputState_->setHandler(NULL);
     64        inputState_->setHandler(nullptr);
    6565        InputManager::getInstance().destroyState("detector");
    6666        ModifyConsoleCommand(__CC_KeyDetector_callback_name).resetFunction();
  • code/branches/cpp11_v2/src/libraries/core/module/DynLib.cc

    r10540 r10765  
    5656    {
    5757        mName = name;
    58         m_hInst = NULL;
     58        m_hInst = nullptr;
    5959    }
    6060
     
    127127            FORMAT_MESSAGE_FROM_SYSTEM |
    128128            FORMAT_MESSAGE_IGNORE_INSERTS,
    129             NULL,
     129            nullptr,
    130130            GetLastError(),
    131131            MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
    132132            (LPTSTR) &lpMsgBuf,
    133133            0,
    134             NULL
     134            nullptr
    135135            );
    136136        std::string ret = (char*)lpMsgBuf;
  • code/branches/cpp11_v2/src/libraries/core/module/DynLib.h

    r10541 r10765  
    4545#if defined(ORXONOX_PLATFORM_WINDOWS)
    4646#    define DYNLIB_HANDLE hInstance
    47 #    define DYNLIB_LOAD( a ) LoadLibraryEx( a, NULL, LOAD_WITH_ALTERED_SEARCH_PATH )
     47#    define DYNLIB_LOAD( a ) LoadLibraryEx( a, nullptr, LOAD_WITH_ALTERED_SEARCH_PATH )
    4848#    define DYNLIB_GETSYM( a, b ) GetProcAddress( a, b )
    4949#    define DYNLIB_UNLOAD( a ) !FreeLibrary( a )
     
    104104                the symbol.
    105105            @par
    106                 If the function fails, the returned value is <b>NULL</b>.
     106                If the function fails, the returned value is <b>nullptr</b>.
    107107
    108108        */
  • code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.cc

    r10549 r10765  
    3333namespace orxonox
    3434{
    35     ModuleInstance* ModuleInstance::currentModuleInstance_s = NULL;
     35    ModuleInstance* ModuleInstance::currentModuleInstance_s = nullptr;
    3636
    3737    ModuleInstance::ModuleInstance(const std::string& libraryName)
    3838        : libraryName_(libraryName)
    39         , dynLib_(NULL)
     39        , dynLib_(nullptr)
    4040    {
    4141    }
  • code/branches/cpp11_v2/src/libraries/core/module/Plugin.cc

    r10553 r10765  
    3838    {
    3939        this->referenceCounter_ = 0;
    40         this->moduleInstance_ = NULL;
     40        this->moduleInstance_ = nullptr;
    4141    }
    4242
    4343    Plugin::~Plugin()
    4444    {
    45         if (this->moduleInstance_ != NULL)
     45        if (this->moduleInstance_ != nullptr)
    4646        {
    4747            this->referenceCounter_ = 1; // force unloading
     
    7777            Core::getInstance().unloadModule(this->moduleInstance_);
    7878            delete this->moduleInstance_;
    79             this->moduleInstance_ = NULL;
     79            this->moduleInstance_ = nullptr;
    8080        }
    8181        else
  • code/branches/cpp11_v2/src/libraries/core/module/PluginManager.cc

    r10580 r10765  
    5656    PluginManager::~PluginManager()
    5757    {
    58         ModifyConsoleCommand("PluginManager", __CC_PluginManager_load_name).setObject(NULL);
    59         ModifyConsoleCommand("PluginManager", __CC_PluginManager_unload_name).setObject(NULL);
     58        ModifyConsoleCommand("PluginManager", __CC_PluginManager_load_name).setObject(nullptr);
     59        ModifyConsoleCommand("PluginManager", __CC_PluginManager_unload_name).setObject(nullptr);
    6060
    6161        for (std::map<std::string, PluginReference*>::iterator it = this->references_.begin(); it != this->references_.end(); ++it)
     
    8989    {
    9090        Plugin* plugin = this->plugins_[name];
    91         if (plugin != NULL)
     91        if (plugin != nullptr)
    9292            plugin->load();
    9393        else
     
    9898    {
    9999        Plugin* plugin = this->plugins_[name];
    100         if (plugin != NULL)
     100        if (plugin != nullptr)
    101101            plugin->unload();
    102102        else
     
    109109    void PluginManager::loadPlugin(const std::string& name)
    110110    {
    111         if (this->references_[name] == NULL)
     111        if (this->references_[name] == nullptr)
    112112        {
    113113            this->references_[name] = new PluginReference(name);
     
    124124    {
    125125        PluginReference* reference = this->references_[name];
    126         if (reference != NULL)
     126        if (reference != nullptr)
    127127        {
    128             this->references_[name] = NULL;
     128            this->references_[name] = nullptr;
    129129            delete reference;
    130130        }
  • code/branches/cpp11_v2/src/libraries/core/object/Context.cc

    r10624 r10765  
    4646        static size_t count = 0;
    4747        // the first time this is called, ++count returns 1 and the context is created
    48         // the second time this is called, ++count returns 2 and NULL is returned because we're in the constructor of the context itself
     48        // the second time this is called, ++count returns 2 and nullptr is returned because we're in the constructor of the context itself
    4949        // for each future call the context (now completely created) is returned
    5050        if (++count == 2)
    51             return NULL;
     51            return nullptr;
    5252        else
    5353        {
    54             static Context context(NULL);
     54            static Context context(nullptr);
    5555            return &context;
    5656        }
     
    8282    {
    8383        delete Context::rootContext_s;
    84         Context::rootContext_s = NULL;
     84        Context::rootContext_s = nullptr;
    8585    }
    8686
    8787    /*static*/ Context* Context::getRootContext()
    8888    {
    89         OrxVerify(Context::rootContext_s != NULL, "Root Context is undefined");
     89        OrxVerify(Context::rootContext_s != nullptr, "Root Context is undefined");
    9090        return Context::rootContext_s;
    9191    }
     
    105105        ObjectListBase* objectList = this->getObjectList(identifier);
    106106        delete objectList;
    107         this->objectLists_[identifier->getClassID()] = NULL;
     107        this->objectLists_[identifier->getClassID()] = nullptr;
    108108    }
    109109}
  • code/branches/cpp11_v2/src/libraries/core/object/Destroyable.cc

    r10624 r10765  
    6666    void Destroyable::destroy()
    6767    {
    68         assert(this); // Just in case someone tries to delete a NULL pointer
     68        assert(this); // Just in case someone tries to delete a nullptr
    6969        this->requestedDestruction_ = true;
    7070        if (this->referenceCount_ == 0)
  • code/branches/cpp11_v2/src/libraries/core/object/IteratorBase.h

    r10736 r10765  
    5858                @brief Constructor: Sets the element, whereon the iterator points, to the given element.
    5959            */
    60             inline IteratorBase(ObjectListElement<T>* element = NULL)
     60            inline IteratorBase(ObjectListElement<T>* element = nullptr)
    6161            {
    6262                this->element_ = element;
     
    151151            inline operator bool() const
    152152            {
    153                 return (this->element_ != NULL);
     153                return (this->element_ != nullptr);
    154154            }
    155155
     
    208208                }
    209209                else
    210                     this->list_ = NULL;
     210                    this->list_ = nullptr;
    211211            }
    212212
  • code/branches/cpp11_v2/src/libraries/core/object/StrongPtr.h

    r10745 r10765  
    248248            }
    249249
    250             /// Returns true if the wrapped pointer is NULL.
     250            /// Returns true if the wrapped pointer is nullptr.
    251251            inline bool operator!() const
    252252            {
     
    269269            }
    270270
    271             /// Resets the strong pointer (equivalent to assigning a NULL pointer).
     271            /// Resets the strong pointer (equivalent to assigning a nullptr).
    272272            inline void reset()
    273273            {
  • code/branches/cpp11_v2/src/libraries/core/object/WeakPtr.h

    r10745 r10765  
    3737
    3838    A WeakPtr wraps a pointer to an object. If the object gets deleted, the WeakPtr becomes
    39     NULL. This can be used to store pointers to objects without knowing when they will be
     39    nullptr. This can be used to store pointers to objects without knowing when they will be
    4040    destroyed.
    4141
     
    5050    WeakPtr<MyClass> pointer = object;                  // create a WeakPtr and assign the object
    5151
    52     if (pointer)                                        // checks if pointer is not NULL (which is true)
     52    if (pointer)                                        // checks if pointer is not nullptr (which is true)
    5353        pointer->someFunction();                        // calls MyClass::someFunction()
    5454
    5555    object->destroy();                                  // calls destroy() which deletes the object
    5656
    57     if (pointer)                                        // checks if pointer is not NULL (which is now false)
     57    if (pointer)                                        // checks if pointer is not nullptr (which is now false)
    5858        pointer->someFunction();                        // this will not be executed
    5959    @endcode
     
    9191{
    9292    /**
    93         @brief WeakPtr wraps a pointer to an object, which becomes NULL if the object is deleted.
     93        @brief WeakPtr wraps a pointer to an object, which becomes nullptr if the object is deleted.
    9494
    9595        @see See @ref WeakPtrExample "this description" for more information and an example.
     
    183183            }
    184184
    185             /// Returns true if the wrapped pointer is NULL.
     185            /// Returns true if the wrapped pointer is nullptr.
    186186            inline bool operator!() const
    187187            {
     
    210210            }
    211211
    212             /// Resets the weak pointer (equivalent to assigning a NULL pointer).
     212            /// Resets the weak pointer (equivalent to assigning a nullptr).
    213213            inline void reset()
    214214            {
  • code/branches/cpp11_v2/src/libraries/core/singleton/ScopedSingletonIncludes.h

    r10535 r10765  
    7171*/
    7272#define ManageScopedSingleton(className, scope, allowedToFail) \
    73     className* className::singletonPtr_s = NULL; \
     73    className* className::singletonPtr_s = nullptr; \
    7474    static ScopedSingletonWrapper& className##ScopedSingletonWrapper \
    7575        = (new orxonox::SI_SSW(new ClassScopedSingletonWrapper<className, allowedToFail>(#className), scope))->getWrapper()
  • code/branches/cpp11_v2/src/libraries/core/singleton/ScopedSingletonWrapper.h

    r10528 r10765  
    9191        ClassScopedSingletonWrapper(const std::string& className)
    9292            : ScopedSingletonWrapper(className)
    93             , singletonPtr_(NULL)
     93            , singletonPtr_(nullptr)
    9494        {
    9595        }
     
    104104        void activated()
    105105        {
    106             assert(singletonPtr_ == NULL);
     106            assert(singletonPtr_ == nullptr);
    107107            singletonPtr_ = new T();
    108108        }
     
    111111        void deactivated()
    112112        {
    113             assert(singletonPtr_ != NULL);
     113            assert(singletonPtr_ != nullptr);
    114114            this->destroy(singletonPtr_);
    115             singletonPtr_ = NULL;
     115            singletonPtr_ = nullptr;
    116116        }
    117117
     
    146146        ClassScopedSingletonWrapper(const std::string& className)
    147147            : ScopedSingletonWrapper(className)
    148             , singletonPtr_(NULL)
     148            , singletonPtr_(nullptr)
    149149        {
    150150        }
     
    159159        void activated()
    160160        {
    161             assert(singletonPtr_ == NULL);
     161            assert(singletonPtr_ == nullptr);
    162162            try
    163163                { singletonPtr_ = new T(); }
     
    171171        void deactivated()
    172172        {
    173             if (singletonPtr_ != NULL)
     173            if (singletonPtr_ != nullptr)
    174174            {
    175175                this->destroy(singletonPtr_);
    176                 singletonPtr_ = NULL;
     176                singletonPtr_ = nullptr;
    177177            }
    178178        }
Note: See TracChangeset for help on using the changeset viewer.