summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2005-09-02 15:32:36 +0000
committerDwayne Boone <dwayne@zeroc.com>2005-09-02 15:32:36 +0000
commita3b69a80211da745b8b5779345522ae84d4e4052 (patch)
treef2fea8aca8ef52be25eddb794676f4c764db17d4 /cpp/src
parentRenamed Callback interface. (diff)
downloadice-a3b69a80211da745b8b5779345522ae84d4e4052.tar.bz2
ice-a3b69a80211da745b8b5779345522ae84d4e4052.tar.xz
ice-a3b69a80211da745b8b5779345522ae84d4e4052.zip
Use auto_ptr.reset
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/ConnectionFactory.cpp2
-rw-r--r--cpp/src/Ice/ConnectionI.cpp6
-rw-r--r--cpp/src/Ice/Outgoing.cpp12
-rw-r--r--cpp/src/Ice/OutgoingAsync.cpp12
-rwxr-xr-xcpp/src/IcePatch2/ClientUtil.cpp4
5 files changed, 18 insertions, 18 deletions
diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp
index bc2f19e4ae9..ef2c5b96712 100644
--- a/cpp/src/Ice/ConnectionFactory.cpp
+++ b/cpp/src/Ice/ConnectionFactory.cpp
@@ -299,7 +299,7 @@ IceInternal::OutgoingConnectionFactory::create(const vector<EndpointPtr>& endpts
}
catch(const LocalException& ex)
{
- exception = auto_ptr<LocalException>(dynamic_cast<LocalException*>(ex.ice_clone()));
+ exception.reset(dynamic_cast<LocalException*>(ex.ice_clone()));
//
// If a connection object was constructed, then validate()
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp
index 91d78c7a5e6..72827746f9b 100644
--- a/cpp/src/Ice/ConnectionI.cpp
+++ b/cpp/src/Ice/ConnectionI.cpp
@@ -1312,7 +1312,7 @@ Ice::ConnectionI::finished(const ThreadPoolPtr& threadPool)
}
catch(const LocalException& ex)
{
- exception = auto_ptr<LocalException>(dynamic_cast<LocalException*>(ex.ice_clone()));
+ exception.reset(dynamic_cast<LocalException*>(ex.ice_clone()));
}
_transceiver = 0;
@@ -1560,7 +1560,7 @@ Ice::ConnectionI::setState(State state, const LocalException& ex)
//
assert(_state != StateClosed);
- _exception = auto_ptr<LocalException>(dynamic_cast<LocalException*>(ex.ice_clone()));
+ _exception.reset(dynamic_cast<LocalException*>(ex.ice_clone()));
if(_warn)
{
@@ -2457,7 +2457,7 @@ Ice::ConnectionI::run()
}
catch(const LocalException& ex)
{
- exception = auto_ptr<LocalException>(dynamic_cast<LocalException*>(ex.ice_clone()));
+ exception.reset(dynamic_cast<LocalException*>(ex.ice_clone()));
}
_transceiver = 0;
diff --git a/cpp/src/Ice/Outgoing.cpp b/cpp/src/Ice/Outgoing.cpp
index bd98109ce16..038641be760 100644
--- a/cpp/src/Ice/Outgoing.cpp
+++ b/cpp/src/Ice/Outgoing.cpp
@@ -20,12 +20,12 @@ using namespace IceInternal;
IceInternal::NonRepeatable::NonRepeatable(const NonRepeatable& ex)
{
- _ex = auto_ptr<LocalException>(dynamic_cast<LocalException*>(ex.get()->ice_clone()));
+ _ex.reset(dynamic_cast<LocalException*>(ex.get()->ice_clone()));
}
IceInternal::NonRepeatable::NonRepeatable(const ::Ice::LocalException& ex)
{
- _ex = auto_ptr<LocalException>(dynamic_cast<LocalException*>(ex.ice_clone()));
+ _ex.reset(dynamic_cast<LocalException*>(ex.ice_clone()));
}
const ::Ice::LocalException*
@@ -383,7 +383,7 @@ IceInternal::Outgoing::finished(BasicStream& is)
ex->id = ident;
ex->facet = facet;
ex->operation = operation;
- _exception = auto_ptr<LocalException>(ex);
+ _exception.reset(ex);
_state = StateLocalException; // The state must be set last, in case there is an exception.
break;
@@ -431,7 +431,7 @@ IceInternal::Outgoing::finished(BasicStream& is)
}
ex->unknown = unknown;
- _exception = auto_ptr<LocalException>(ex);
+ _exception.reset(ex);
_state = StateLocalException; // The state must be set last, in case there is an exception.
break;
@@ -439,7 +439,7 @@ IceInternal::Outgoing::finished(BasicStream& is)
default:
{
- _exception = auto_ptr<LocalException>(new UnknownReplyStatusException(__FILE__, __LINE__));
+ _exception.reset(new UnknownReplyStatusException(__FILE__, __LINE__));
_state = StateLocalException;
break;
}
@@ -458,6 +458,6 @@ IceInternal::Outgoing::finished(const LocalException& ex)
assert(_state <= StateInProgress);
_state = StateLocalException;
- _exception = auto_ptr<LocalException>(dynamic_cast<LocalException*>(ex.ice_clone()));
+ _exception.reset(dynamic_cast<LocalException*>(ex.ice_clone()));
notify();
}
diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp
index 044b0dbca0f..736d4b4f28b 100644
--- a/cpp/src/Ice/OutgoingAsync.cpp
+++ b/cpp/src/Ice/OutgoingAsync.cpp
@@ -95,19 +95,19 @@ IceInternal::OutgoingAsync::__finished(BasicStream& is)
{
case DispatchObjectNotExist:
{
- ex = auto_ptr<RequestFailedException>(new ObjectNotExistException(__FILE__, __LINE__));
+ ex.reset(new ObjectNotExistException(__FILE__, __LINE__));
break;
}
case DispatchFacetNotExist:
{
- ex = auto_ptr<RequestFailedException>(new FacetNotExistException(__FILE__, __LINE__));
+ ex.reset(new FacetNotExistException(__FILE__, __LINE__));
break;
}
case DispatchOperationNotExist:
{
- ex = auto_ptr<RequestFailedException>(new OperationNotExistException(__FILE__, __LINE__));
+ ex.reset(new OperationNotExistException(__FILE__, __LINE__));
break;
}
@@ -136,19 +136,19 @@ IceInternal::OutgoingAsync::__finished(BasicStream& is)
{
case DispatchUnknownException:
{
- ex = auto_ptr<UnknownException>(new UnknownException(__FILE__, __LINE__));
+ ex.reset(new UnknownException(__FILE__, __LINE__));
break;
}
case DispatchUnknownLocalException:
{
- ex = auto_ptr<UnknownException>(new UnknownLocalException(__FILE__, __LINE__));
+ ex.reset(new UnknownLocalException(__FILE__, __LINE__));
break;
}
case DispatchUnknownUserException:
{
- ex = auto_ptr<UnknownException>(new UnknownUserException(__FILE__, __LINE__));
+ ex.reset(new UnknownUserException(__FILE__, __LINE__));
break;
}
diff --git a/cpp/src/IcePatch2/ClientUtil.cpp b/cpp/src/IcePatch2/ClientUtil.cpp
index a01f70a16e6..e65f1505b9c 100755
--- a/cpp/src/IcePatch2/ClientUtil.cpp
+++ b/cpp/src/IcePatch2/ClientUtil.cpp
@@ -267,7 +267,7 @@ public:
ice_exception(const Exception& ex)
{
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
- _exception = auto_ptr<Exception>(ex.ice_clone());
+ _exception.reset(ex.ice_clone());
_done = true;
notify();
}
@@ -744,7 +744,7 @@ public:
ice_exception(const Exception& ex)
{
IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this);
- _exception = auto_ptr<Exception>(ex.ice_clone());
+ _exception.reset(ex.ice_clone());
_done = true;
notify();
}