Skip to content

Commit

Permalink
Merge pull request WolfireGames#13 from EmpSurak/sc/s4997
Browse files Browse the repository at this point in the history
Replace deprecated auto_ptr (S4997)
  • Loading branch information
autious authored Apr 22, 2022
2 parents 500b181 + 9d9847f commit 08da859
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Source/Game/level.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class Level :
// vvv These are just here to avoid per-frame mallocs vvv
CollisionPtrMap old_col_ptr_map;

std::auto_ptr<ASCollisions> as_collisions;
std::unique_ptr<ASCollisions> as_collisions;

Path FindScript(const std::string& path);
};
2 changes: 1 addition & 1 deletion Source/Graphics/skeleton.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class Skeleton {


public:
std::auto_ptr<BulletWorld> col_bullet_world;
std::unique_ptr<BulletWorld> col_bullet_world;
std::vector<int> parents;
std::vector<PhysicsBone> physics_bones;
std::vector<PhysicsJoint> physics_joints;
Expand Down
4 changes: 2 additions & 2 deletions Source/JSON/jsoncpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ static int stackDepth_g = 0; // see readValue()

namespace Json {

typedef std::auto_ptr<CharReader> CharReaderPtr;
typedef std::unique_ptr<CharReader> CharReaderPtr;

// Implementation of class Features
// ////////////////////////////////
Expand Down Expand Up @@ -3825,7 +3825,7 @@ Value& Path::make(Value& root) const {

namespace Json {

typedef std::auto_ptr<StreamWriter> StreamWriterPtr;
typedef std::unique_ptr<StreamWriter> StreamWriterPtr;

static bool containsControlCharacter(const char* str) {
while (*str) {
Expand Down
2 changes: 1 addition & 1 deletion Source/Objects/envobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ struct MaterialParticle;
class EnvObject: public Object {
public:
float timestamp_for_sendoff = 0.0f;
std::auto_ptr<PlantComponent> plant_component_;
std::unique_ptr<PlantComponent> plant_component_;
ObjectFileRef ofr;

BulletObject* bullet_object_;
Expand Down
2 changes: 1 addition & 1 deletion Source/Objects/hotspot.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Hotspot : public Object {
virtual void NotifyDeleted(Object* o);
virtual EntityType GetType() const { return _hotspot_object; }

std::auto_ptr<ASCollisions> as_collisions;
std::unique_ptr<ASCollisions> as_collisions;

void Reset();
virtual void SetEnabled(bool val);
Expand Down
6 changes: 3 additions & 3 deletions Source/Objects/movementobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class MovementObject: public Object {
std::string character_path;
ReactionScriptGetter reaction_script_getter;
CharacterScriptGetter character_script_getter;
std::auto_ptr<ASContext> as_context;
std::unique_ptr<ASContext> as_context;
OGPalette palette;
int connected_pathpoint_id;
std::vector<ItemConnection> item_connection_vec;
Expand All @@ -150,7 +150,7 @@ class MovementObject: public Object {
std::string nametag_string;
vec3 nametag_last_position;

std::auto_ptr<ASCollisions> as_collisions;
std::unique_ptr<ASCollisions> as_collisions;

ActorFileRef actor_file_ref;
std::set<SoundGroupRef> touched_surface_refs;
Expand Down Expand Up @@ -248,7 +248,7 @@ class MovementObject: public Object {
std::string GetTeamString();
void StartPoseAnimation(std::string path);
private:
std::auto_ptr<RiggedObject> rigged_object_;
std::unique_ptr<RiggedObject> rigged_object_;
std::string current_control_script_path;
std::string actor_script_path;
BulletObject* char_sphere;
Expand Down
2 changes: 1 addition & 1 deletion Source/Physics/bulletobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class BulletObject {
std::vector<mat4> transform_history;
btRigidBody *body;
SharedShapePtr shape;
std::auto_ptr<ShapeDisposalData> shape_disposal_data;
std::unique_ptr<ShapeDisposalData> shape_disposal_data;
bool visible;
vec3 com_offset;
short collision_group;
Expand Down
2 changes: 1 addition & 1 deletion Source/Sound/sound.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class Sound {

Soundtrack m_soundtrack;

typedef std::auto_ptr<ambientSound> ambient_ptr;
typedef std::unique_ptr<ambientSound> ambient_ptr;
ambient_ptr m_air_whoosh_sound;
int whoosh_active_countdown; //Kill whoosh if not updated in given frameperiod.

Expand Down

0 comments on commit 08da859

Please sign in to comment.