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:
parent
c758160d09
commit
8cc8be5603
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user