Make internal storage of userdata non copyable or movable
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
Signed-off-by: Deukhoofd <deukhoofd@gmail.com>
This commit is contained in:
parent
09e30a234c
commit
ef150f6851
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
namespace Porygon::UserData {
|
namespace Porygon::UserData {
|
||||||
class UserDataStorage {
|
class UserDataStorage {
|
||||||
|
private:
|
||||||
class _internalDataStorage {
|
class _internalDataStorage {
|
||||||
public:
|
public:
|
||||||
std::unordered_map<uint32_t, UserData*> _userData;
|
std::unordered_map<uint32_t, UserData*> _userData;
|
||||||
|
@ -19,6 +20,11 @@ namespace Porygon::UserData {
|
||||||
}
|
}
|
||||||
_userData.clear();
|
_userData.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_internalDataStorage() = default;
|
||||||
|
_internalDataStorage( const UserDataStorage& ) = delete; // non construction-copyable
|
||||||
|
_internalDataStorage& operator=( const UserDataStorage& ) = delete; // non copyable
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static _internalDataStorage _internal;
|
static _internalDataStorage _internal;
|
||||||
|
|
Loading…
Reference in New Issue