Kaydet (Commit) 8522c20c authored tarafından Michael Stahl's avatar Michael Stahl

sc: replace boost::ptr_map with std::map<std::unique_ptr>

Change-Id: Idabd8facd21efb2da3e46185272d76bce2d0b44c
üst 7086ed59
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#include <osl/file.hxx> #include <osl/file.hxx>
#include <unotools/transliterationwrapper.hxx> #include <unotools/transliterationwrapper.hxx>
#include <o3tl/make_unique.hxx> #include <o3tl/make_unique.hxx>
#include <boost/ptr_container/ptr_map.hpp>
#include <memory> #include <memory>
#include "callform.hxx" #include "callform.hxx"
...@@ -125,8 +124,8 @@ namespace { ...@@ -125,8 +124,8 @@ namespace {
class ModuleCollection class ModuleCollection
{ {
typedef boost::ptr_map<OUString, ModuleData> MapType; typedef std::map<OUString, std::unique_ptr<ModuleData>> MapType;
MapType maData; MapType m_Data;
public: public:
ModuleCollection() {} ModuleCollection() {}
...@@ -137,8 +136,8 @@ public: ...@@ -137,8 +136,8 @@ public:
const ModuleData* ModuleCollection::findByName(const OUString& rName) const const ModuleData* ModuleCollection::findByName(const OUString& rName) const
{ {
MapType::const_iterator it = maData.find(rName); MapType::const_iterator it = m_Data.find(rName);
return it == maData.end() ? nullptr : it->second; return it == m_Data.end() ? nullptr : it->second.get();
} }
void ModuleCollection::insert(ModuleData* pNew) void ModuleCollection::insert(ModuleData* pNew)
...@@ -147,12 +146,12 @@ void ModuleCollection::insert(ModuleData* pNew) ...@@ -147,12 +146,12 @@ void ModuleCollection::insert(ModuleData* pNew)
return; return;
OUString aName = pNew->GetName(); OUString aName = pNew->GetName();
maData.insert(aName, pNew); m_Data.insert(std::make_pair(aName, std::unique_ptr<ModuleData>(pNew)));
} }
void ModuleCollection::clear() void ModuleCollection::clear()
{ {
maData.clear(); m_Data.clear();
} }
ModuleCollection aModuleCollection; ModuleCollection aModuleCollection;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment