Commit f7ecc749 authored by Maciej Suminski's avatar Maciej Suminski

Restored std::map in TOOL_MANAGER.

parent 5ce29330
......@@ -109,7 +109,7 @@ TOOL_MANAGER::TOOL_MANAGER() :
TOOL_MANAGER::~TOOL_MANAGER()
{
boost::unordered_map<TOOL_BASE*, TOOL_STATE*>::iterator it, it_end;
std::map<TOOL_BASE*, TOOL_STATE*>::iterator it, it_end;
for( it = m_toolState.begin(), it_end = m_toolState.end(); it != it_end; ++it )
{
......@@ -276,7 +276,7 @@ bool TOOL_MANAGER::runTool( TOOL_BASE* aTool )
TOOL_BASE* TOOL_MANAGER::FindTool( int aId ) const
{
boost::unordered_map<TOOL_ID, TOOL_STATE*>::const_iterator it = m_toolIdIndex.find( aId );
std::map<TOOL_ID, TOOL_STATE*>::const_iterator it = m_toolIdIndex.find( aId );
if( it != m_toolIdIndex.end() )
return it->second->theTool;
......@@ -287,7 +287,7 @@ TOOL_BASE* TOOL_MANAGER::FindTool( int aId ) const
TOOL_BASE* TOOL_MANAGER::FindTool( const std::string& aName ) const
{
boost::unordered_map<std::string, TOOL_STATE*>::const_iterator it = m_toolNameIndex.find( aName );
std::map<std::string, TOOL_STATE*>::const_iterator it = m_toolNameIndex.find( aName );
if( it != m_toolNameIndex.end() )
return it->second->theTool;
......
......@@ -28,7 +28,7 @@
#include <deque>
#include <typeinfo>
#include <boost/unordered_map.hpp>
#include <map>
#include <math/vector2d.h>
......@@ -143,7 +143,7 @@ public:
template<typename T>
T* GetTool()
{
boost::unordered_map<const char*, TOOL_BASE*>::iterator tool = m_toolTypes.find( typeid( T ).name() );
std::map<const char*, TOOL_BASE*>::iterator tool = m_toolTypes.find( typeid( T ).name() );
if( tool != m_toolTypes.end() )
return static_cast<T*>( tool->second );
......@@ -360,16 +360,16 @@ private:
bool isActive( TOOL_BASE* aTool );
/// Index of registered tools current states, associated by tools' objects.
boost::unordered_map<TOOL_BASE*, TOOL_STATE*> m_toolState;
std::map<TOOL_BASE*, TOOL_STATE*> m_toolState;
/// Index of the registered tools current states, associated by tools' names.
boost::unordered_map<std::string, TOOL_STATE*> m_toolNameIndex;
std::map<std::string, TOOL_STATE*> m_toolNameIndex;
/// Index of the registered tools to easily lookup by their type.
boost::unordered_map<const char*, TOOL_BASE*> m_toolTypes;
std::map<const char*, TOOL_BASE*> m_toolTypes;
/// Index of the registered tools current states, associated by tools' ID numbers.
boost::unordered_map<TOOL_ID, TOOL_STATE*> m_toolIdIndex;
std::map<TOOL_ID, TOOL_STATE*> m_toolIdIndex;
/// Stack of the active tools
std::deque<TOOL_ID> m_activeTools;
......
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