diff options
author | Bernard Normier <bernard@zeroc.com> | 2016-07-19 18:39:55 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2016-07-19 18:39:55 -0400 |
commit | 09ff416d9060c022b63fe4a33dc7d995153a44ba (patch) | |
tree | d017c47d6be74fb45282c82bf5bd77953f737d8a /cpp/src/Ice/FactoryTable.cpp | |
parent | Merge remote-tracking branch 'origin/3.6' (diff) | |
download | ice-09ff416d9060c022b63fe4a33dc7d995153a44ba.tar.bz2 ice-09ff416d9060c022b63fe4a33dc7d995153a44ba.tar.xz ice-09ff416d9060c022b63fe4a33dc7d995153a44ba.zip |
New UserExceptionFactory for C++11
Diffstat (limited to 'cpp/src/Ice/FactoryTable.cpp')
-rw-r--r-- | cpp/src/Ice/FactoryTable.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cpp/src/Ice/FactoryTable.cpp b/cpp/src/Ice/FactoryTable.cpp index 78b8a1c8b2b..27d6a8a5d8e 100644 --- a/cpp/src/Ice/FactoryTable.cpp +++ b/cpp/src/Ice/FactoryTable.cpp @@ -12,18 +12,21 @@ using namespace std; +#ifndef ICE_CPP11_MAPPING Ice::UserExceptionFactory::~UserExceptionFactory() { // Out of line to avoid weak vtable } +#endif + // // Add a factory to the exception factory table. // If the factory is present already, increment its reference count. // void -IceInternal::FactoryTable::addExceptionFactory(const string& t, const Ice::UserExceptionFactoryPtr& f) +IceInternal::FactoryTable::addExceptionFactory(const string& t, ICE_IN(ICE_USER_EXCEPTION_FACTORY) f) { IceUtil::Mutex::Lock lock(_m); assert(f); @@ -41,12 +44,12 @@ IceInternal::FactoryTable::addExceptionFactory(const string& t, const Ice::UserE // // Return the exception factory for a given type ID // -Ice::UserExceptionFactoryPtr +ICE_USER_EXCEPTION_FACTORY IceInternal::FactoryTable::getExceptionFactory(const string& t) const { IceUtil::Mutex::Lock lock(_m); EFTable::const_iterator i = _eft.find(t); - return i != _eft.end() ? i->second.first : Ice::UserExceptionFactoryPtr(); + return i != _eft.end() ? i->second.first : ICE_USER_EXCEPTION_FACTORY(); } // |