Make internal storage of userdata non copyable or movable
continuous-integration/drone/push Build is failing Details

Signed-off-by: Deukhoofd <deukhoofd@gmail.com>
This commit is contained in:
Deukhoofd 2019-06-24 16:21:47 +02:00
parent 09e30a234c
commit ef150f6851
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 6 additions and 0 deletions

View File

@ -8,6 +8,7 @@
namespace Porygon::UserData {
class UserDataStorage {
private:
class _internalDataStorage {
public:
std::unordered_map<uint32_t, UserData*> _userData;
@ -19,6 +20,11 @@ namespace Porygon::UserData {
}
_userData.clear();
}
_internalDataStorage() = default;
_internalDataStorage( const UserDataStorage& ) = delete; // non construction-copyable
_internalDataStorage& operator=( const UserDataStorage& ) = delete; // non copyable
};
static _internalDataStorage _internal;