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/module
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • 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        }
Note: See TracChangeset for help on using the changeset viewer.