1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-15 06:52:34 +02:00

Small change, new -> make_shared.

This commit is contained in:
Filip Gawin 2017-11-08 00:03:28 +01:00 committed by Daniel Evans
parent c758160d09
commit 8cc8be5603
4 changed files with 4 additions and 4 deletions

View File

@ -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>(VehicleInfo{
info, {}, {}})});
} else {
mit->second->handling = info;

View File

@ -147,7 +147,7 @@ void InstanceObject::changeModel(BaseModelInfo* incoming) {
}
if (collision) {
body.reset(new CollisionInstance);
body = std::make_unique<CollisionInstance>();
body->createPhysicsBody(this, collision, dynamics.get());
body->getBulletBody()->setActivationState(ISLAND_SLEEPING);
}

View File

@ -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<TextureData>(name, size, transparent);
}
private:

View File

@ -122,5 +122,5 @@ FileHandle FileIndex::openFile(const std::string& filename) {
return nullptr;
}
return FileHandle(new FileContentsInfo{data, length});
return std::make_shared<FileContentsInfo>(data, length);
}