diff --git a/rwengine/src/loaders/GenericDATLoader.cpp b/rwengine/src/loaders/GenericDATLoader.cpp index 33217ea4..7e1837b8 100644 --- a/rwengine/src/loaders/GenericDATLoader.cpp +++ b/rwengine/src/loaders/GenericDATLoader.cpp @@ -176,7 +176,7 @@ void GenericDATLoader::loadHandling(const std::string& name, auto mit = vehicleData.find(info.ID); if (mit == vehicleData.end()) { - vehicleData.insert({info.ID, VehicleInfoHandle(new VehicleInfo{ + vehicleData.insert({info.ID, std::make_shared(VehicleInfo{ info, {}, {}})}); } else { mit->second->handling = info; diff --git a/rwengine/src/objects/InstanceObject.cpp b/rwengine/src/objects/InstanceObject.cpp index 2e4232f0..8a0a2432 100644 --- a/rwengine/src/objects/InstanceObject.cpp +++ b/rwengine/src/objects/InstanceObject.cpp @@ -147,7 +147,7 @@ void InstanceObject::changeModel(BaseModelInfo* incoming) { } if (collision) { - body.reset(new CollisionInstance); + body = std::make_unique(); body->createPhysicsBody(this, collision, dynamics.get()); body->getBulletBody()->setActivationState(ISLAND_SLEEPING); } diff --git a/rwlib/source/gl/TextureData.hpp b/rwlib/source/gl/TextureData.hpp index 850e7873..b59b805f 100644 --- a/rwlib/source/gl/TextureData.hpp +++ b/rwlib/source/gl/TextureData.hpp @@ -34,7 +34,7 @@ public: static Handle create(GLuint name, const glm::ivec2& size, bool transparent) { - return Handle(new TextureData(name, size, transparent)); + return std::make_shared(name, size, transparent); } private: diff --git a/rwlib/source/platform/FileIndex.cpp b/rwlib/source/platform/FileIndex.cpp index 14a19a71..18732bea 100644 --- a/rwlib/source/platform/FileIndex.cpp +++ b/rwlib/source/platform/FileIndex.cpp @@ -122,5 +122,5 @@ FileHandle FileIndex::openFile(const std::string& filename) { return nullptr; } - return FileHandle(new FileContentsInfo{data, length}); + return std::make_shared(data, length); }