mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Use boost::optional and boost::none instead of smelly pointer (#24134)
* Remove bad pointer usage from CharacterCache
Use TrinityCore Option type instead which is intended for this purpose. (Wrapper around boost::option until C++17 bump is finalised)
* Unify codestyle regarding TC optional type
Based upon advice from @Shauren
(cherry picked from commit 76831f1f46)
This commit is contained in:
@@ -278,7 +278,7 @@ Optional<std::shared_ptr<ScriptModule>>
|
||||
path.generic_string().c_str());
|
||||
}
|
||||
|
||||
return boost::none;
|
||||
return {};
|
||||
}
|
||||
|
||||
// Use RAII to release the library on failure.
|
||||
@@ -305,7 +305,7 @@ Optional<std::shared_ptr<ScriptModule>>
|
||||
TC_LOG_ERROR("scripts.hotswap", "Could not extract all required functions from the shared library \"%s\"!",
|
||||
path.generic_string().c_str());
|
||||
|
||||
return boost::none;
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user