Base: modernize C++11

* remove redundant void-arg
* use nullptr
* replace deprecated headers
This commit is contained in:
wmayer
2022-01-25 20:21:30 +01:00
parent 6c29c65013
commit cad0d01883
72 changed files with 628 additions and 633 deletions

View File

@@ -49,7 +49,7 @@ void* Factory::Produce (const char *sClassName) const
if (pProd != _mpcProducers.end())
return pProd->second->Produce();
else
return NULL;
return nullptr;
}
void Factory::AddProducer (const char *sClassName, AbstractProducer *pcProducer)
@@ -76,22 +76,22 @@ std::list<std::string> Factory::CanProduce() const
// ----------------------------------------------------
ScriptFactorySingleton* ScriptFactorySingleton::_pcSingleton = NULL;
ScriptFactorySingleton* ScriptFactorySingleton::_pcSingleton = nullptr;
ScriptFactorySingleton& ScriptFactorySingleton::Instance(void)
ScriptFactorySingleton& ScriptFactorySingleton::Instance()
{
if (_pcSingleton == NULL)
if (_pcSingleton == nullptr)
_pcSingleton = new ScriptFactorySingleton;
return *_pcSingleton;
}
void ScriptFactorySingleton::Destruct (void)
void ScriptFactorySingleton::Destruct ()
{
if (_pcSingleton != 0)
if (_pcSingleton != nullptr)
delete _pcSingleton;
_pcSingleton = 0;
_pcSingleton = nullptr;
}
const char* ScriptFactorySingleton::ProduceScript (const char* sScriptName) const