diff --git a/simgear/debug/BufferedLogCallback.hxx b/simgear/debug/BufferedLogCallback.hxx index f48ac3c0..bda7fd31 100644 --- a/simgear/debug/BufferedLogCallback.hxx +++ b/simgear/debug/BufferedLogCallback.hxx @@ -24,7 +24,7 @@ #define SG_DEBUG_BUFFEREDLOGCALLBACK_HXX #include -#include // for std::auto_ptr +#include // for std::unique_ptr #include @@ -70,10 +70,10 @@ public: unsigned int threadsafeCopy(vector_cstring& aOutput); private: class BufferedLogCallbackPrivate; - std::auto_ptr d; + std::unique_ptr d; }; } // of namespace simgear -#endif // of SG_DEBUG_BUFFEREDLOGCALLBACK_HXX \ No newline at end of file +#endif // of SG_DEBUG_BUFFEREDLOGCALLBACK_HXX diff --git a/simgear/hla/RTI13Ambassador.hxx b/simgear/hla/RTI13Ambassador.hxx index 85779fa7..d4d6e02c 100644 --- a/simgear/hla/RTI13Ambassador.hxx +++ b/simgear/hla/RTI13Ambassador.hxx @@ -117,7 +117,7 @@ public: // bool unconditionalAttributeOwnershipDivestiture(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles) // { // try { - // std::auto_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size())); + // std::unique_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size())); // for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i) // attributeHandleSet->add(*i); // _rtiAmbassador.unconditionalAttributeOwnershipDivestiture(objectHandle, *attributeHandleSet); @@ -136,7 +136,7 @@ public: // bool negotiatedAttributeOwnershipDivestiture(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles, const RTIData& tag) // { // try { - // std::auto_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size())); + // std::unique_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size())); // for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i) // attributeHandleSet->add(*i); // _rtiAmbassador.negotiatedAttributeOwnershipDivestiture(objectHandle, *attributeHandleSet, tag.data()); @@ -156,7 +156,7 @@ public: // bool attributeOwnershipAcquisition(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles, const RTIData& tag) // { // try { - // std::auto_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size())); + // std::unique_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size())); // for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i) // attributeHandleSet->add(*i); // _rtiAmbassador.attributeOwnershipAcquisition(objectHandle, *attributeHandleSet, tag.data()); @@ -177,7 +177,7 @@ public: // bool attributeOwnershipAcquisitionIfAvailable(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles) // { // try { - // std::auto_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size())); + // std::unique_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size())); // for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i) // attributeHandleSet->add(*i); // _rtiAmbassador.attributeOwnershipAcquisitionIfAvailable(objectHandle, *attributeHandleSet); @@ -199,7 +199,7 @@ public: // RTIHandleSet attributeOwnershipReleaseResponse(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles) // { // try { - // std::auto_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size())); + // std::unique_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size())); // for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i) // attributeHandleSet->add(*i); // attributeHandleSet.reset(_rtiAmbassador.attributeOwnershipReleaseResponse(objectHandle, *attributeHandleSet)); @@ -223,7 +223,7 @@ public: // bool cancelNegotiatedAttributeOwnershipDivestiture(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles) // { // try { - // std::auto_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size())); + // std::unique_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size())); // for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i) // attributeHandleSet->add(*i); // _rtiAmbassador.cancelNegotiatedAttributeOwnershipDivestiture(objectHandle, *attributeHandleSet); @@ -243,7 +243,7 @@ public: // bool cancelAttributeOwnershipAcquisition(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles) // { // try { - // std::auto_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size())); + // std::unique_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size())); // for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i) // attributeHandleSet->add(*i); // _rtiAmbassador.cancelAttributeOwnershipAcquisition(objectHandle, *attributeHandleSet); diff --git a/simgear/hla/RTI13ObjectClass.cxx b/simgear/hla/RTI13ObjectClass.cxx index 0a04480b..d0464e08 100644 --- a/simgear/hla/RTI13ObjectClass.cxx +++ b/simgear/hla/RTI13ObjectClass.cxx @@ -101,7 +101,7 @@ RTI13ObjectClass::publish(const HLAIndexList& indexList) try { unsigned numAttributes = getNumAttributes(); - std::auto_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(numAttributes)); + std::unique_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(numAttributes)); for (HLAIndexList::const_iterator i = indexList.begin(); i != indexList.end(); ++i) { if (_attributeHandleVector.size() <= *i) { SG_LOG(SG_NETWORK, SG_WARN, "RTI13ObjectClass::publish(): Invalid attribute index!"); @@ -195,7 +195,7 @@ RTI13ObjectClass::subscribe(const HLAIndexList& indexList, bool active) try { unsigned numAttributes = getNumAttributes(); - std::auto_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(numAttributes)); + std::unique_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(numAttributes)); for (HLAIndexList::const_iterator i = indexList.begin(); i != indexList.end(); ++i) { if (_attributeHandleVector.size() <= *i) { SG_LOG(SG_NETWORK, SG_WARN, "RTI13ObjectClass::subscribe(): Invalid attribute index!"); diff --git a/simgear/hla/RTI13ObjectInstance.cxx b/simgear/hla/RTI13ObjectInstance.cxx index 58f95f9a..2fbbbf3a 100644 --- a/simgear/hla/RTI13ObjectInstance.cxx +++ b/simgear/hla/RTI13ObjectInstance.cxx @@ -243,7 +243,7 @@ RTI13ObjectInstance::requestObjectAttributeValueUpdate(const HLAIndexList& index try { unsigned numAttributes = getNumAttributes(); - std::auto_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(numAttributes)); + std::unique_ptr attributeHandleSet(RTI::AttributeHandleSetFactory::create(numAttributes)); for (HLAIndexList::const_iterator i = indexList.begin(); i != indexList.end(); ++i) { if (getAttributeOwned(*i)) { SG_LOG(SG_NETWORK, SG_WARN, "RTI13ObjectInstance::requestObjectAttributeValueUpdate(): " diff --git a/simgear/hla/RTI13ObjectInstance.hxx b/simgear/hla/RTI13ObjectInstance.hxx index cfba3872..46be0c8b 100644 --- a/simgear/hla/RTI13ObjectInstance.hxx +++ b/simgear/hla/RTI13ObjectInstance.hxx @@ -101,7 +101,7 @@ private: SGSharedPtr _ambassador; // cached storage for updates - std::auto_ptr _attributeValuePairSet; + std::unique_ptr _attributeValuePairSet; }; } diff --git a/simgear/io/DNSClient.hxx b/simgear/io/DNSClient.hxx index c7853f6a..155ee33b 100644 --- a/simgear/io/DNSClient.hxx +++ b/simgear/io/DNSClient.hxx @@ -24,7 +24,7 @@ #ifndef SG_DNS_CLIENT_HXX #define SG_DNS_CLIENT_HXX -#include // for std::auto_ptr +#include // for std::unique_ptr #include #include #include // for time_t @@ -133,7 +133,7 @@ public: // void cancelRequest(const Request_ptr& r, std::string reason = std::string()); class ClientPrivate; - std::auto_ptr d; + std::unique_ptr d; }; } // of namespace DNS diff --git a/simgear/io/HTTPClient.hxx b/simgear/io/HTTPClient.hxx index a535b5b5..ffc5a395 100644 --- a/simgear/io/HTTPClient.hxx +++ b/simgear/io/HTTPClient.hxx @@ -24,7 +24,7 @@ #ifndef SG_HTTP_CLIENT_HXX #define SG_HTTP_CLIENT_HXX -#include // for std::auto_ptr +#include // for std::unique_ptr #include // for uint_64t #include @@ -125,7 +125,7 @@ private: friend class Request; class ClientPrivate; - std::auto_ptr d; + std::unique_ptr d; }; } // of namespace HTTP diff --git a/simgear/io/HTTPRepository.cxx b/simgear/io/HTTPRepository.cxx index 83b84444..1c95f278 100644 --- a/simgear/io/HTTPRepository.cxx +++ b/simgear/io/HTTPRepository.cxx @@ -725,7 +725,7 @@ HTTPRepository::failure() const std::string fileName; // if empty, we're getting the directory itself SGPath pathInRepo; simgear::sha1nfo hashContext; - std::auto_ptr file; + std::unique_ptr file; }; class DirGetRequest : public HTTPRepoGetRequest diff --git a/simgear/io/HTTPRepository.hxx b/simgear/io/HTTPRepository.hxx index c3f95348..2a0205ee 100644 --- a/simgear/io/HTTPRepository.hxx +++ b/simgear/io/HTTPRepository.hxx @@ -73,7 +73,7 @@ public: private: bool isBare() const; - std::auto_ptr _d; + std::unique_ptr _d; }; } // of namespace simgear diff --git a/simgear/io/test_repository.cxx b/simgear/io/test_repository.cxx index 18bc26ad..6afb0edf 100644 --- a/simgear/io/test_repository.cxx +++ b/simgear/io/test_repository.cxx @@ -71,7 +71,7 @@ public: int requestCount; bool getWillFail; bool returnCorruptData; - std::auto_ptr accessCallback; + std::unique_ptr accessCallback; void clearRequestCounts(); @@ -400,7 +400,7 @@ void waitForUpdateComplete(HTTP::Client* cl, HTTPRepository* repo) void testBasicClone(HTTP::Client* cl) { - std::auto_ptr repo; + std::unique_ptr repo; SGPath p(simgear::Dir::current().path()); p.append("http_repo_basic"); simgear::Dir pd(p); @@ -435,7 +435,7 @@ void testBasicClone(HTTP::Client* cl) void testModifyLocalFiles(HTTP::Client* cl) { - std::auto_ptr repo; + std::unique_ptr repo; SGPath p(simgear::Dir::current().path()); p.append("http_repo_modify_local_2"); simgear::Dir pd(p); @@ -476,7 +476,7 @@ void testNoChangesUpdate() void testMergeExistingFileWithoutDownload(HTTP::Client* cl) { - std::auto_ptr repo; + std::unique_ptr repo; SGPath p(simgear::Dir::current().path()); p.append("http_repo_merge_existing"); simgear::Dir pd(p); @@ -518,7 +518,7 @@ void testMergeExistingFileWithoutDownload(HTTP::Client* cl) void testLossOfLocalFiles(HTTP::Client* cl) { - std::auto_ptr repo; + std::unique_ptr repo; SGPath p(simgear::Dir::current().path()); p.append("http_repo_lose_local"); simgear::Dir pd(p); @@ -552,7 +552,7 @@ void testLossOfLocalFiles(HTTP::Client* cl) void testAbandonMissingFiles(HTTP::Client* cl) { - std::auto_ptr repo; + std::unique_ptr repo; SGPath p(simgear::Dir::current().path()); p.append("http_repo_missing_files"); simgear::Dir pd(p); @@ -576,7 +576,7 @@ void testAbandonMissingFiles(HTTP::Client* cl) void testAbandonCorruptFiles(HTTP::Client* cl) { - std::auto_ptr repo; + std::unique_ptr repo; SGPath p(simgear::Dir::current().path()); p.append("http_repo_corrupt_files"); simgear::Dir pd(p); @@ -616,7 +616,7 @@ void modifyBTree() void testServerModifyDuringSync(HTTP::Client* cl) { - std::auto_ptr repo; + std::unique_ptr repo; SGPath p(simgear::Dir::current().path()); p.append("http_repo_server_modify_during_sync"); simgear::Dir pd(p); @@ -647,7 +647,7 @@ void testServerModifyDuringSync(HTTP::Client* cl) void testDestroyDuringSync(HTTP::Client* cl) { - std::auto_ptr repo; + std::unique_ptr repo; SGPath p(simgear::Dir::current().path()); p.append("http_repo_destory_during_sync"); simgear::Dir pd(p); @@ -676,7 +676,7 @@ void testDestroyDuringSync(HTTP::Client* cl) void testCopyInstalledChildren(HTTP::Client* cl) { - std::auto_ptr repo; + std::unique_ptr repo; SGPath p(simgear::Dir::current().path()); p.append("http_repo_copy_installed_children"); simgear::Dir pd(p); diff --git a/simgear/io/untar.cxx b/simgear/io/untar.cxx index abbfbad3..9ed7caac 100644 --- a/simgear/io/untar.cxx +++ b/simgear/io/untar.cxx @@ -101,7 +101,7 @@ public: }; size_t bytesRemaining; - std::auto_ptr currentFile; + std::unique_ptr currentFile; size_t currentFileSize; z_stream zlibStream; uint8_t* zlibOutput; diff --git a/simgear/io/untar.hxx b/simgear/io/untar.hxx index 0da06b20..b1db9063 100644 --- a/simgear/io/untar.hxx +++ b/simgear/io/untar.hxx @@ -44,7 +44,7 @@ public: bool hasError() const; private: - std::auto_ptr d; + std::unique_ptr d; }; } // of namespace simgear diff --git a/simgear/nasal/cppbind/Ghost.hxx b/simgear/nasal/cppbind/Ghost.hxx index 4c0a3e48..c1875bf6 100644 --- a/simgear/nasal/cppbind/Ghost.hxx +++ b/simgear/nasal/cppbind/Ghost.hxx @@ -1200,7 +1200,7 @@ namespace nasal return ctx; }; - typedef std::auto_ptr GhostPtr; + typedef std::unique_ptr GhostPtr; MemberMap _members; fallback_getter_t _fallback_getter; fallback_setter_t _fallback_setter; diff --git a/simgear/package/Root.hxx b/simgear/package/Root.hxx index 69ac4804..0a16e982 100644 --- a/simgear/package/Root.hxx +++ b/simgear/package/Root.hxx @@ -19,7 +19,7 @@ #define SG_PACKAGE_ROOT_HXX #include -#include // for auto_ptr +#include // for unique_ptr #include #include @@ -161,7 +161,7 @@ private: class ThumbnailDownloader; class RootPrivate; - std::auto_ptr d; + std::unique_ptr d; }; typedef SGSharedPtr RootRef; diff --git a/simgear/scene/material/matlib.hxx b/simgear/scene/material/matlib.hxx index 7ead9d75..90fb273c 100644 --- a/simgear/scene/material/matlib.hxx +++ b/simgear/scene/material/matlib.hxx @@ -69,7 +69,7 @@ class SGMaterialLib : public SGReferenced private: class MatLibPrivate; - std::auto_ptr d; + std::unique_ptr d; // associative array of materials typedef std::vector< SGSharedPtr > material_list; diff --git a/simgear/scene/tgdb/apt_signs.hxx b/simgear/scene/tgdb/apt_signs.hxx index b0fd9169..37281f6a 100644 --- a/simgear/scene/tgdb/apt_signs.hxx +++ b/simgear/scene/tgdb/apt_signs.hxx @@ -51,7 +51,7 @@ public: osg::Node* getSignsGroup(); private: class AirportSignBuilderPrivate; - std::auto_ptr d; + std::unique_ptr d; }; } // of namespace simgear diff --git a/simgear/scene/tsync/terrasync.cxx b/simgear/scene/tsync/terrasync.cxx index 1af55655..69c7268d 100644 --- a/simgear/scene/tsync/terrasync.cxx +++ b/simgear/scene/tsync/terrasync.cxx @@ -165,7 +165,7 @@ public: SyncItem currentItem; bool isNewDirectory; std::queue queue; - std::auto_ptr repository; + std::unique_ptr repository; SGTimeStamp stamp; bool busy; ///< is the slot working or idle unsigned int pendingKBytes; diff --git a/simgear/sound/soundmgr.hxx b/simgear/sound/soundmgr.hxx index 18844564..21d87d8d 100644 --- a/simgear/sound/soundmgr.hxx +++ b/simgear/sound/soundmgr.hxx @@ -33,7 +33,7 @@ #include #include #include -#include // for std::auto_ptr +#include // for std::unique_ptr #include #include @@ -328,7 +328,7 @@ public: private: class SoundManagerPrivate; /// private implementation object - std::auto_ptr d; + std::unique_ptr d; bool _block_support; bool _active; diff --git a/simgear/structure/StateMachine.hxx b/simgear/structure/StateMachine.hxx index a382760f..dcdc27c4 100644 --- a/simgear/structure/StateMachine.hxx +++ b/simgear/structure/StateMachine.hxx @@ -64,7 +64,7 @@ public: void update(); class StatePrivate; - std::auto_ptr d; + std::unique_ptr d; }; class Transition : public SGReferenced @@ -118,7 +118,7 @@ public: void fireBindings(); class TransitionPrivate; - std::auto_ptr d; + std::unique_ptr d; }; typedef SGSharedPtr State_ptr; @@ -167,7 +167,7 @@ private: void innerChangeState(State_ptr aState, Transition_ptr aTrans); class StateMachinePrivate; - std::auto_ptr d; + std::unique_ptr d; }; typedef SGSharedPtr StateMachine_ptr; diff --git a/simgear/timing/sg_time.cxx b/simgear/timing/sg_time.cxx index f8c51d6c..2282db93 100644 --- a/simgear/timing/sg_time.cxx +++ b/simgear/timing/sg_time.cxx @@ -60,7 +60,7 @@ static const double J2000 = 2451545.0 - MJD0; static const double SIDRATE = 0.9972695677; // tzContainer stores all the current Timezone control points/ -std::auto_ptr static_tzContainer; +std::unique_ptr static_tzContainer; void SGTime::init( const SGGeod& location, const SGPath& root, time_t init_time ) { diff --git a/simgear/timing/sg_time.hxx b/simgear/timing/sg_time.hxx index 9243d1c9..00c058af 100644 --- a/simgear/timing/sg_time.hxx +++ b/simgear/timing/sg_time.hxx @@ -36,7 +36,7 @@ #include #include -#include // for std::auto_ptr +#include // for std::unique_ptr #include // forward decls diff --git a/simgear/xml/XMLStaticParser.hxx b/simgear/xml/XMLStaticParser.hxx index 8cecac68..93f8801f 100644 --- a/simgear/xml/XMLStaticParser.hxx +++ b/simgear/xml/XMLStaticParser.hxx @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include