diff options
Diffstat (limited to 'cpp/src/Ice/FactoryTable.cpp')
-rw-r--r-- | cpp/src/Ice/FactoryTable.cpp | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/cpp/src/Ice/FactoryTable.cpp b/cpp/src/Ice/FactoryTable.cpp index d8b37ec8b58..e7fec2162ab 100644 --- a/cpp/src/Ice/FactoryTable.cpp +++ b/cpp/src/Ice/FactoryTable.cpp @@ -66,13 +66,8 @@ IceInternal::FactoryTable::removeExceptionFactory(const string& t) // // Add a factory to the value factory table. // -#ifdef ICE_CPP11_MAPPING void -IceInternal::FactoryTable::addValueFactory(const string& t, function<::Ice::ValuePtr (string)> f) -#else -void -IceInternal::FactoryTable::addValueFactory(const string& t, const ::Ice::ValueFactoryPtr& f) -#endif +IceInternal::FactoryTable::addValueFactory(const string& t, ICE_IN(ICE_VALUE_FACTORY) f) { IceUtil::Mutex::Lock lock(_m); assert(f); @@ -90,23 +85,13 @@ IceInternal::FactoryTable::addValueFactory(const string& t, const ::Ice::ValueFa // // Return the value factory for a given type ID // -#ifdef ICE_CPP11_MAPPING -function<Ice::ValuePtr(const string&)> -IceInternal::FactoryTable::getValueFactory(const string& t) const -{ - IceUtil::Mutex::Lock lock(_m); - VFTable::const_iterator i = _vft.find(t); - return i != _vft.end() ? i->second.first : nullptr; -} -#else -Ice::ValueFactoryPtr +ICE_VALUE_FACTORY IceInternal::FactoryTable::getValueFactory(const string& t) const { IceUtil::Mutex::Lock lock(_m); VFTable::const_iterator i = _vft.find(t); - return i != _vft.end() ? i->second.first : Ice::ValueFactoryPtr(); + return i != _vft.end() ? i->second.first : ICE_VALUE_FACTORY(); } -#endif // // Remove a factory from the value factory table. If the factory |