Replace auto_ptr with unique_ptr
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
#define SG_DEBUG_BUFFEREDLOGCALLBACK_HXX
|
#define SG_DEBUG_BUFFEREDLOGCALLBACK_HXX
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <memory> // for std::auto_ptr
|
#include <memory> // for std::unique_ptr
|
||||||
|
|
||||||
#include <simgear/debug/logstream.hxx>
|
#include <simgear/debug/logstream.hxx>
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ public:
|
|||||||
unsigned int threadsafeCopy(vector_cstring& aOutput);
|
unsigned int threadsafeCopy(vector_cstring& aOutput);
|
||||||
private:
|
private:
|
||||||
class BufferedLogCallbackPrivate;
|
class BufferedLogCallbackPrivate;
|
||||||
std::auto_ptr<BufferedLogCallbackPrivate> d;
|
std::unique_ptr<BufferedLogCallbackPrivate> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ public:
|
|||||||
// bool unconditionalAttributeOwnershipDivestiture(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles)
|
// bool unconditionalAttributeOwnershipDivestiture(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles)
|
||||||
// {
|
// {
|
||||||
// try {
|
// try {
|
||||||
// std::auto_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size()));
|
// std::unique_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size()));
|
||||||
// for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i)
|
// for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i)
|
||||||
// attributeHandleSet->add(*i);
|
// attributeHandleSet->add(*i);
|
||||||
// _rtiAmbassador.unconditionalAttributeOwnershipDivestiture(objectHandle, *attributeHandleSet);
|
// _rtiAmbassador.unconditionalAttributeOwnershipDivestiture(objectHandle, *attributeHandleSet);
|
||||||
@@ -136,7 +136,7 @@ public:
|
|||||||
// bool negotiatedAttributeOwnershipDivestiture(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles, const RTIData& tag)
|
// bool negotiatedAttributeOwnershipDivestiture(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles, const RTIData& tag)
|
||||||
// {
|
// {
|
||||||
// try {
|
// try {
|
||||||
// std::auto_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size()));
|
// std::unique_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size()));
|
||||||
// for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i)
|
// for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i)
|
||||||
// attributeHandleSet->add(*i);
|
// attributeHandleSet->add(*i);
|
||||||
// _rtiAmbassador.negotiatedAttributeOwnershipDivestiture(objectHandle, *attributeHandleSet, tag.data());
|
// _rtiAmbassador.negotiatedAttributeOwnershipDivestiture(objectHandle, *attributeHandleSet, tag.data());
|
||||||
@@ -156,7 +156,7 @@ public:
|
|||||||
// bool attributeOwnershipAcquisition(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles, const RTIData& tag)
|
// bool attributeOwnershipAcquisition(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles, const RTIData& tag)
|
||||||
// {
|
// {
|
||||||
// try {
|
// try {
|
||||||
// std::auto_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size()));
|
// std::unique_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size()));
|
||||||
// for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i)
|
// for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i)
|
||||||
// attributeHandleSet->add(*i);
|
// attributeHandleSet->add(*i);
|
||||||
// _rtiAmbassador.attributeOwnershipAcquisition(objectHandle, *attributeHandleSet, tag.data());
|
// _rtiAmbassador.attributeOwnershipAcquisition(objectHandle, *attributeHandleSet, tag.data());
|
||||||
@@ -177,7 +177,7 @@ public:
|
|||||||
// bool attributeOwnershipAcquisitionIfAvailable(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles)
|
// bool attributeOwnershipAcquisitionIfAvailable(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles)
|
||||||
// {
|
// {
|
||||||
// try {
|
// try {
|
||||||
// std::auto_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size()));
|
// std::unique_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size()));
|
||||||
// for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i)
|
// for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i)
|
||||||
// attributeHandleSet->add(*i);
|
// attributeHandleSet->add(*i);
|
||||||
// _rtiAmbassador.attributeOwnershipAcquisitionIfAvailable(objectHandle, *attributeHandleSet);
|
// _rtiAmbassador.attributeOwnershipAcquisitionIfAvailable(objectHandle, *attributeHandleSet);
|
||||||
@@ -199,7 +199,7 @@ public:
|
|||||||
// RTIHandleSet attributeOwnershipReleaseResponse(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles)
|
// RTIHandleSet attributeOwnershipReleaseResponse(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles)
|
||||||
// {
|
// {
|
||||||
// try {
|
// try {
|
||||||
// std::auto_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size()));
|
// std::unique_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size()));
|
||||||
// for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i)
|
// for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i)
|
||||||
// attributeHandleSet->add(*i);
|
// attributeHandleSet->add(*i);
|
||||||
// attributeHandleSet.reset(_rtiAmbassador.attributeOwnershipReleaseResponse(objectHandle, *attributeHandleSet));
|
// attributeHandleSet.reset(_rtiAmbassador.attributeOwnershipReleaseResponse(objectHandle, *attributeHandleSet));
|
||||||
@@ -223,7 +223,7 @@ public:
|
|||||||
// bool cancelNegotiatedAttributeOwnershipDivestiture(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles)
|
// bool cancelNegotiatedAttributeOwnershipDivestiture(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles)
|
||||||
// {
|
// {
|
||||||
// try {
|
// try {
|
||||||
// std::auto_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size()));
|
// std::unique_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size()));
|
||||||
// for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i)
|
// for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i)
|
||||||
// attributeHandleSet->add(*i);
|
// attributeHandleSet->add(*i);
|
||||||
// _rtiAmbassador.cancelNegotiatedAttributeOwnershipDivestiture(objectHandle, *attributeHandleSet);
|
// _rtiAmbassador.cancelNegotiatedAttributeOwnershipDivestiture(objectHandle, *attributeHandleSet);
|
||||||
@@ -243,7 +243,7 @@ public:
|
|||||||
// bool cancelAttributeOwnershipAcquisition(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles)
|
// bool cancelAttributeOwnershipAcquisition(const RTIHandle& objectHandle, const RTIHandleSet& attributeHandles)
|
||||||
// {
|
// {
|
||||||
// try {
|
// try {
|
||||||
// std::auto_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size()));
|
// std::unique_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(attributeHandles.size()));
|
||||||
// for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i)
|
// for (RTIHandleSet::const_iterator i = attributeHandles.begin(); i != attributeHandles.end(); ++i)
|
||||||
// attributeHandleSet->add(*i);
|
// attributeHandleSet->add(*i);
|
||||||
// _rtiAmbassador.cancelAttributeOwnershipAcquisition(objectHandle, *attributeHandleSet);
|
// _rtiAmbassador.cancelAttributeOwnershipAcquisition(objectHandle, *attributeHandleSet);
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ RTI13ObjectClass::publish(const HLAIndexList& indexList)
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
unsigned numAttributes = getNumAttributes();
|
unsigned numAttributes = getNumAttributes();
|
||||||
std::auto_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(numAttributes));
|
std::unique_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(numAttributes));
|
||||||
for (HLAIndexList::const_iterator i = indexList.begin(); i != indexList.end(); ++i) {
|
for (HLAIndexList::const_iterator i = indexList.begin(); i != indexList.end(); ++i) {
|
||||||
if (_attributeHandleVector.size() <= *i) {
|
if (_attributeHandleVector.size() <= *i) {
|
||||||
SG_LOG(SG_NETWORK, SG_WARN, "RTI13ObjectClass::publish(): Invalid attribute index!");
|
SG_LOG(SG_NETWORK, SG_WARN, "RTI13ObjectClass::publish(): Invalid attribute index!");
|
||||||
@@ -195,7 +195,7 @@ RTI13ObjectClass::subscribe(const HLAIndexList& indexList, bool active)
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
unsigned numAttributes = getNumAttributes();
|
unsigned numAttributes = getNumAttributes();
|
||||||
std::auto_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(numAttributes));
|
std::unique_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(numAttributes));
|
||||||
for (HLAIndexList::const_iterator i = indexList.begin(); i != indexList.end(); ++i) {
|
for (HLAIndexList::const_iterator i = indexList.begin(); i != indexList.end(); ++i) {
|
||||||
if (_attributeHandleVector.size() <= *i) {
|
if (_attributeHandleVector.size() <= *i) {
|
||||||
SG_LOG(SG_NETWORK, SG_WARN, "RTI13ObjectClass::subscribe(): Invalid attribute index!");
|
SG_LOG(SG_NETWORK, SG_WARN, "RTI13ObjectClass::subscribe(): Invalid attribute index!");
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ RTI13ObjectInstance::requestObjectAttributeValueUpdate(const HLAIndexList& index
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
unsigned numAttributes = getNumAttributes();
|
unsigned numAttributes = getNumAttributes();
|
||||||
std::auto_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(numAttributes));
|
std::unique_ptr<RTI::AttributeHandleSet> attributeHandleSet(RTI::AttributeHandleSetFactory::create(numAttributes));
|
||||||
for (HLAIndexList::const_iterator i = indexList.begin(); i != indexList.end(); ++i) {
|
for (HLAIndexList::const_iterator i = indexList.begin(); i != indexList.end(); ++i) {
|
||||||
if (getAttributeOwned(*i)) {
|
if (getAttributeOwned(*i)) {
|
||||||
SG_LOG(SG_NETWORK, SG_WARN, "RTI13ObjectInstance::requestObjectAttributeValueUpdate(): "
|
SG_LOG(SG_NETWORK, SG_WARN, "RTI13ObjectInstance::requestObjectAttributeValueUpdate(): "
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ private:
|
|||||||
SGSharedPtr<RTI13Ambassador> _ambassador;
|
SGSharedPtr<RTI13Ambassador> _ambassador;
|
||||||
|
|
||||||
// cached storage for updates
|
// cached storage for updates
|
||||||
std::auto_ptr<RTI::AttributeHandleValuePairSet> _attributeValuePairSet;
|
std::unique_ptr<RTI::AttributeHandleValuePairSet> _attributeValuePairSet;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#ifndef SG_DNS_CLIENT_HXX
|
#ifndef SG_DNS_CLIENT_HXX
|
||||||
#define SG_DNS_CLIENT_HXX
|
#define SG_DNS_CLIENT_HXX
|
||||||
|
|
||||||
#include <memory> // for std::auto_ptr
|
#include <memory> // for std::unique_ptr
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <ctime> // for time_t
|
#include <ctime> // for time_t
|
||||||
@@ -133,7 +133,7 @@ public:
|
|||||||
// void cancelRequest(const Request_ptr& r, std::string reason = std::string());
|
// void cancelRequest(const Request_ptr& r, std::string reason = std::string());
|
||||||
|
|
||||||
class ClientPrivate;
|
class ClientPrivate;
|
||||||
std::auto_ptr<ClientPrivate> d;
|
std::unique_ptr<ClientPrivate> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // of namespace DNS
|
} // of namespace DNS
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#ifndef SG_HTTP_CLIENT_HXX
|
#ifndef SG_HTTP_CLIENT_HXX
|
||||||
#define SG_HTTP_CLIENT_HXX
|
#define SG_HTTP_CLIENT_HXX
|
||||||
|
|
||||||
#include <memory> // for std::auto_ptr
|
#include <memory> // for std::unique_ptr
|
||||||
#include <stdint.h> // for uint_64t
|
#include <stdint.h> // for uint_64t
|
||||||
|
|
||||||
#include <simgear/io/HTTPFileRequest.hxx>
|
#include <simgear/io/HTTPFileRequest.hxx>
|
||||||
@@ -125,7 +125,7 @@ private:
|
|||||||
friend class Request;
|
friend class Request;
|
||||||
|
|
||||||
class ClientPrivate;
|
class ClientPrivate;
|
||||||
std::auto_ptr<ClientPrivate> d;
|
std::unique_ptr<ClientPrivate> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // of namespace HTTP
|
} // of namespace HTTP
|
||||||
|
|||||||
@@ -725,7 +725,7 @@ HTTPRepository::failure() const
|
|||||||
std::string fileName; // if empty, we're getting the directory itself
|
std::string fileName; // if empty, we're getting the directory itself
|
||||||
SGPath pathInRepo;
|
SGPath pathInRepo;
|
||||||
simgear::sha1nfo hashContext;
|
simgear::sha1nfo hashContext;
|
||||||
std::auto_ptr<SGBinaryFile> file;
|
std::unique_ptr<SGBinaryFile> file;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DirGetRequest : public HTTPRepoGetRequest
|
class DirGetRequest : public HTTPRepoGetRequest
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
bool isBare() const;
|
bool isBare() const;
|
||||||
|
|
||||||
std::auto_ptr<HTTPRepoPrivate> _d;
|
std::unique_ptr<HTTPRepoPrivate> _d;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // of namespace simgear
|
} // of namespace simgear
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ public:
|
|||||||
int requestCount;
|
int requestCount;
|
||||||
bool getWillFail;
|
bool getWillFail;
|
||||||
bool returnCorruptData;
|
bool returnCorruptData;
|
||||||
std::auto_ptr<SGCallback> accessCallback;
|
std::unique_ptr<SGCallback> accessCallback;
|
||||||
|
|
||||||
void clearRequestCounts();
|
void clearRequestCounts();
|
||||||
|
|
||||||
@@ -400,7 +400,7 @@ void waitForUpdateComplete(HTTP::Client* cl, HTTPRepository* repo)
|
|||||||
|
|
||||||
void testBasicClone(HTTP::Client* cl)
|
void testBasicClone(HTTP::Client* cl)
|
||||||
{
|
{
|
||||||
std::auto_ptr<HTTPRepository> repo;
|
std::unique_ptr<HTTPRepository> repo;
|
||||||
SGPath p(simgear::Dir::current().path());
|
SGPath p(simgear::Dir::current().path());
|
||||||
p.append("http_repo_basic");
|
p.append("http_repo_basic");
|
||||||
simgear::Dir pd(p);
|
simgear::Dir pd(p);
|
||||||
@@ -435,7 +435,7 @@ void testBasicClone(HTTP::Client* cl)
|
|||||||
|
|
||||||
void testModifyLocalFiles(HTTP::Client* cl)
|
void testModifyLocalFiles(HTTP::Client* cl)
|
||||||
{
|
{
|
||||||
std::auto_ptr<HTTPRepository> repo;
|
std::unique_ptr<HTTPRepository> repo;
|
||||||
SGPath p(simgear::Dir::current().path());
|
SGPath p(simgear::Dir::current().path());
|
||||||
p.append("http_repo_modify_local_2");
|
p.append("http_repo_modify_local_2");
|
||||||
simgear::Dir pd(p);
|
simgear::Dir pd(p);
|
||||||
@@ -476,7 +476,7 @@ void testNoChangesUpdate()
|
|||||||
|
|
||||||
void testMergeExistingFileWithoutDownload(HTTP::Client* cl)
|
void testMergeExistingFileWithoutDownload(HTTP::Client* cl)
|
||||||
{
|
{
|
||||||
std::auto_ptr<HTTPRepository> repo;
|
std::unique_ptr<HTTPRepository> repo;
|
||||||
SGPath p(simgear::Dir::current().path());
|
SGPath p(simgear::Dir::current().path());
|
||||||
p.append("http_repo_merge_existing");
|
p.append("http_repo_merge_existing");
|
||||||
simgear::Dir pd(p);
|
simgear::Dir pd(p);
|
||||||
@@ -518,7 +518,7 @@ void testMergeExistingFileWithoutDownload(HTTP::Client* cl)
|
|||||||
|
|
||||||
void testLossOfLocalFiles(HTTP::Client* cl)
|
void testLossOfLocalFiles(HTTP::Client* cl)
|
||||||
{
|
{
|
||||||
std::auto_ptr<HTTPRepository> repo;
|
std::unique_ptr<HTTPRepository> repo;
|
||||||
SGPath p(simgear::Dir::current().path());
|
SGPath p(simgear::Dir::current().path());
|
||||||
p.append("http_repo_lose_local");
|
p.append("http_repo_lose_local");
|
||||||
simgear::Dir pd(p);
|
simgear::Dir pd(p);
|
||||||
@@ -552,7 +552,7 @@ void testLossOfLocalFiles(HTTP::Client* cl)
|
|||||||
|
|
||||||
void testAbandonMissingFiles(HTTP::Client* cl)
|
void testAbandonMissingFiles(HTTP::Client* cl)
|
||||||
{
|
{
|
||||||
std::auto_ptr<HTTPRepository> repo;
|
std::unique_ptr<HTTPRepository> repo;
|
||||||
SGPath p(simgear::Dir::current().path());
|
SGPath p(simgear::Dir::current().path());
|
||||||
p.append("http_repo_missing_files");
|
p.append("http_repo_missing_files");
|
||||||
simgear::Dir pd(p);
|
simgear::Dir pd(p);
|
||||||
@@ -576,7 +576,7 @@ void testAbandonMissingFiles(HTTP::Client* cl)
|
|||||||
|
|
||||||
void testAbandonCorruptFiles(HTTP::Client* cl)
|
void testAbandonCorruptFiles(HTTP::Client* cl)
|
||||||
{
|
{
|
||||||
std::auto_ptr<HTTPRepository> repo;
|
std::unique_ptr<HTTPRepository> repo;
|
||||||
SGPath p(simgear::Dir::current().path());
|
SGPath p(simgear::Dir::current().path());
|
||||||
p.append("http_repo_corrupt_files");
|
p.append("http_repo_corrupt_files");
|
||||||
simgear::Dir pd(p);
|
simgear::Dir pd(p);
|
||||||
@@ -616,7 +616,7 @@ void modifyBTree()
|
|||||||
|
|
||||||
void testServerModifyDuringSync(HTTP::Client* cl)
|
void testServerModifyDuringSync(HTTP::Client* cl)
|
||||||
{
|
{
|
||||||
std::auto_ptr<HTTPRepository> repo;
|
std::unique_ptr<HTTPRepository> repo;
|
||||||
SGPath p(simgear::Dir::current().path());
|
SGPath p(simgear::Dir::current().path());
|
||||||
p.append("http_repo_server_modify_during_sync");
|
p.append("http_repo_server_modify_during_sync");
|
||||||
simgear::Dir pd(p);
|
simgear::Dir pd(p);
|
||||||
@@ -647,7 +647,7 @@ void testServerModifyDuringSync(HTTP::Client* cl)
|
|||||||
|
|
||||||
void testDestroyDuringSync(HTTP::Client* cl)
|
void testDestroyDuringSync(HTTP::Client* cl)
|
||||||
{
|
{
|
||||||
std::auto_ptr<HTTPRepository> repo;
|
std::unique_ptr<HTTPRepository> repo;
|
||||||
SGPath p(simgear::Dir::current().path());
|
SGPath p(simgear::Dir::current().path());
|
||||||
p.append("http_repo_destory_during_sync");
|
p.append("http_repo_destory_during_sync");
|
||||||
simgear::Dir pd(p);
|
simgear::Dir pd(p);
|
||||||
@@ -676,7 +676,7 @@ void testDestroyDuringSync(HTTP::Client* cl)
|
|||||||
|
|
||||||
void testCopyInstalledChildren(HTTP::Client* cl)
|
void testCopyInstalledChildren(HTTP::Client* cl)
|
||||||
{
|
{
|
||||||
std::auto_ptr<HTTPRepository> repo;
|
std::unique_ptr<HTTPRepository> repo;
|
||||||
SGPath p(simgear::Dir::current().path());
|
SGPath p(simgear::Dir::current().path());
|
||||||
p.append("http_repo_copy_installed_children");
|
p.append("http_repo_copy_installed_children");
|
||||||
simgear::Dir pd(p);
|
simgear::Dir pd(p);
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
size_t bytesRemaining;
|
size_t bytesRemaining;
|
||||||
std::auto_ptr<SGFile> currentFile;
|
std::unique_ptr<SGFile> currentFile;
|
||||||
size_t currentFileSize;
|
size_t currentFileSize;
|
||||||
z_stream zlibStream;
|
z_stream zlibStream;
|
||||||
uint8_t* zlibOutput;
|
uint8_t* zlibOutput;
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public:
|
|||||||
bool hasError() const;
|
bool hasError() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::auto_ptr<TarExtractorPrivate> d;
|
std::unique_ptr<TarExtractorPrivate> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // of namespace simgear
|
} // of namespace simgear
|
||||||
|
|||||||
@@ -1200,7 +1200,7 @@ namespace nasal
|
|||||||
return ctx;
|
return ctx;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::auto_ptr<Ghost> GhostPtr;
|
typedef std::unique_ptr<Ghost> GhostPtr;
|
||||||
MemberMap _members;
|
MemberMap _members;
|
||||||
fallback_getter_t _fallback_getter;
|
fallback_getter_t _fallback_getter;
|
||||||
fallback_setter_t _fallback_setter;
|
fallback_setter_t _fallback_setter;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#define SG_PACKAGE_ROOT_HXX
|
#define SG_PACKAGE_ROOT_HXX
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <memory> // for auto_ptr
|
#include <memory> // for unique_ptr
|
||||||
|
|
||||||
#include <simgear/misc/sg_path.hxx>
|
#include <simgear/misc/sg_path.hxx>
|
||||||
#include <simgear/package/Delegate.hxx>
|
#include <simgear/package/Delegate.hxx>
|
||||||
@@ -161,7 +161,7 @@ private:
|
|||||||
|
|
||||||
class ThumbnailDownloader;
|
class ThumbnailDownloader;
|
||||||
class RootPrivate;
|
class RootPrivate;
|
||||||
std::auto_ptr<RootPrivate> d;
|
std::unique_ptr<RootPrivate> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef SGSharedPtr<Root> RootRef;
|
typedef SGSharedPtr<Root> RootRef;
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class SGMaterialLib : public SGReferenced
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
class MatLibPrivate;
|
class MatLibPrivate;
|
||||||
std::auto_ptr<MatLibPrivate> d;
|
std::unique_ptr<MatLibPrivate> d;
|
||||||
|
|
||||||
// associative array of materials
|
// associative array of materials
|
||||||
typedef std::vector< SGSharedPtr<SGMaterial> > material_list;
|
typedef std::vector< SGSharedPtr<SGMaterial> > material_list;
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ public:
|
|||||||
osg::Node* getSignsGroup();
|
osg::Node* getSignsGroup();
|
||||||
private:
|
private:
|
||||||
class AirportSignBuilderPrivate;
|
class AirportSignBuilderPrivate;
|
||||||
std::auto_ptr<AirportSignBuilderPrivate> d;
|
std::unique_ptr<AirportSignBuilderPrivate> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // of namespace simgear
|
} // of namespace simgear
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ public:
|
|||||||
SyncItem currentItem;
|
SyncItem currentItem;
|
||||||
bool isNewDirectory;
|
bool isNewDirectory;
|
||||||
std::queue<SyncItem> queue;
|
std::queue<SyncItem> queue;
|
||||||
std::auto_ptr<HTTPRepository> repository;
|
std::unique_ptr<HTTPRepository> repository;
|
||||||
SGTimeStamp stamp;
|
SGTimeStamp stamp;
|
||||||
bool busy; ///< is the slot working or idle
|
bool busy; ///< is the slot working or idle
|
||||||
unsigned int pendingKBytes;
|
unsigned int pendingKBytes;
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <memory> // for std::auto_ptr
|
#include <memory> // for std::unique_ptr
|
||||||
|
|
||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
#include <simgear/structure/subsystem_mgr.hxx>
|
#include <simgear/structure/subsystem_mgr.hxx>
|
||||||
@@ -328,7 +328,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
class SoundManagerPrivate;
|
class SoundManagerPrivate;
|
||||||
/// private implementation object
|
/// private implementation object
|
||||||
std::auto_ptr<SoundManagerPrivate> d;
|
std::unique_ptr<SoundManagerPrivate> d;
|
||||||
|
|
||||||
bool _block_support;
|
bool _block_support;
|
||||||
bool _active;
|
bool _active;
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public:
|
|||||||
void update();
|
void update();
|
||||||
|
|
||||||
class StatePrivate;
|
class StatePrivate;
|
||||||
std::auto_ptr<StatePrivate> d;
|
std::unique_ptr<StatePrivate> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Transition : public SGReferenced
|
class Transition : public SGReferenced
|
||||||
@@ -118,7 +118,7 @@ public:
|
|||||||
void fireBindings();
|
void fireBindings();
|
||||||
|
|
||||||
class TransitionPrivate;
|
class TransitionPrivate;
|
||||||
std::auto_ptr<TransitionPrivate> d;
|
std::unique_ptr<TransitionPrivate> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef SGSharedPtr<State> State_ptr;
|
typedef SGSharedPtr<State> State_ptr;
|
||||||
@@ -167,7 +167,7 @@ private:
|
|||||||
void innerChangeState(State_ptr aState, Transition_ptr aTrans);
|
void innerChangeState(State_ptr aState, Transition_ptr aTrans);
|
||||||
|
|
||||||
class StateMachinePrivate;
|
class StateMachinePrivate;
|
||||||
std::auto_ptr<StateMachinePrivate> d;
|
std::unique_ptr<StateMachinePrivate> d;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef SGSharedPtr<StateMachine> StateMachine_ptr;
|
typedef SGSharedPtr<StateMachine> StateMachine_ptr;
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ static const double J2000 = 2451545.0 - MJD0;
|
|||||||
static const double SIDRATE = 0.9972695677;
|
static const double SIDRATE = 0.9972695677;
|
||||||
|
|
||||||
// tzContainer stores all the current Timezone control points/
|
// tzContainer stores all the current Timezone control points/
|
||||||
std::auto_ptr<SGTimeZoneContainer> static_tzContainer;
|
std::unique_ptr<SGTimeZoneContainer> static_tzContainer;
|
||||||
|
|
||||||
void SGTime::init( const SGGeod& location, const SGPath& root, time_t init_time )
|
void SGTime::init( const SGGeod& location, const SGPath& root, time_t init_time )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
#include <simgear/compiler.h>
|
#include <simgear/compiler.h>
|
||||||
|
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <memory> // for std::auto_ptr
|
#include <memory> // for std::unique_ptr
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
// forward decls
|
// forward decls
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
#include <auto_ptr>
|
#include <memory>
|
||||||
|
|
||||||
#include <osg/ref_ptr>
|
#include <osg/ref_ptr>
|
||||||
#include <osg/Referenced>
|
#include <osg/Referenced>
|
||||||
|
|||||||
Reference in New Issue
Block a user