Changeset 10765 for code/branches/cpp11_v2/src/libraries/core/module
- Timestamp:
- Nov 4, 2015, 10:25:42 PM (9 years ago)
- 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 56 56 { 57 57 mName = name; 58 m_hInst = NULL;58 m_hInst = nullptr; 59 59 } 60 60 … … 127 127 FORMAT_MESSAGE_FROM_SYSTEM | 128 128 FORMAT_MESSAGE_IGNORE_INSERTS, 129 NULL,129 nullptr, 130 130 GetLastError(), 131 131 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), 132 132 (LPTSTR) &lpMsgBuf, 133 133 0, 134 NULL134 nullptr 135 135 ); 136 136 std::string ret = (char*)lpMsgBuf; -
code/branches/cpp11_v2/src/libraries/core/module/DynLib.h
r10541 r10765 45 45 #if defined(ORXONOX_PLATFORM_WINDOWS) 46 46 # 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 ) 48 48 # define DYNLIB_GETSYM( a, b ) GetProcAddress( a, b ) 49 49 # define DYNLIB_UNLOAD( a ) !FreeLibrary( a ) … … 104 104 the symbol. 105 105 @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>. 107 107 108 108 */ -
code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.cc
r10549 r10765 33 33 namespace orxonox 34 34 { 35 ModuleInstance* ModuleInstance::currentModuleInstance_s = NULL;35 ModuleInstance* ModuleInstance::currentModuleInstance_s = nullptr; 36 36 37 37 ModuleInstance::ModuleInstance(const std::string& libraryName) 38 38 : libraryName_(libraryName) 39 , dynLib_( NULL)39 , dynLib_(nullptr) 40 40 { 41 41 } -
code/branches/cpp11_v2/src/libraries/core/module/Plugin.cc
r10553 r10765 38 38 { 39 39 this->referenceCounter_ = 0; 40 this->moduleInstance_ = NULL;40 this->moduleInstance_ = nullptr; 41 41 } 42 42 43 43 Plugin::~Plugin() 44 44 { 45 if (this->moduleInstance_ != NULL)45 if (this->moduleInstance_ != nullptr) 46 46 { 47 47 this->referenceCounter_ = 1; // force unloading … … 77 77 Core::getInstance().unloadModule(this->moduleInstance_); 78 78 delete this->moduleInstance_; 79 this->moduleInstance_ = NULL;79 this->moduleInstance_ = nullptr; 80 80 } 81 81 else -
code/branches/cpp11_v2/src/libraries/core/module/PluginManager.cc
r10580 r10765 56 56 PluginManager::~PluginManager() 57 57 { 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); 60 60 61 61 for (std::map<std::string, PluginReference*>::iterator it = this->references_.begin(); it != this->references_.end(); ++it) … … 89 89 { 90 90 Plugin* plugin = this->plugins_[name]; 91 if (plugin != NULL)91 if (plugin != nullptr) 92 92 plugin->load(); 93 93 else … … 98 98 { 99 99 Plugin* plugin = this->plugins_[name]; 100 if (plugin != NULL)100 if (plugin != nullptr) 101 101 plugin->unload(); 102 102 else … … 109 109 void PluginManager::loadPlugin(const std::string& name) 110 110 { 111 if (this->references_[name] == NULL)111 if (this->references_[name] == nullptr) 112 112 { 113 113 this->references_[name] = new PluginReference(name); … … 124 124 { 125 125 PluginReference* reference = this->references_[name]; 126 if (reference != NULL)126 if (reference != nullptr) 127 127 { 128 this->references_[name] = NULL;128 this->references_[name] = nullptr; 129 129 delete reference; 130 130 }
Note: See TracChangeset
for help on using the changeset viewer.