mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 07:53:53 +00:00
Don't use unordered_map
This commit is contained in:
parent
78bac93021
commit
fcbcc004a3
3 changed files with 3 additions and 31 deletions
|
@ -201,12 +201,6 @@ if(NOT HAVE_STDINT_H)
|
||||||
message(FATAL_ERROR "stdint.h was not found" )
|
message(FATAL_ERROR "stdint.h was not found" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include (CheckIncludeFileCXX)
|
|
||||||
check_include_file_cxx(unordered_map HAVE_UNORDERED_MAP)
|
|
||||||
if (HAVE_UNORDERED_MAP)
|
|
||||||
add_definitions(-DHAVE_UNORDERED_MAP)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
|
|
||||||
set(BOOST_COMPONENTS system filesystem program_options thread)
|
set(BOOST_COMPONENTS system filesystem program_options thread)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
#include "worldimp.hpp"
|
#include "worldimp.hpp"
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
|
||||||
#include <boost/tr1/tr1/unordered_map>
|
|
||||||
#elif defined HAVE_UNORDERED_MAP
|
|
||||||
#include <unordered_map>
|
|
||||||
#else
|
|
||||||
#include <tr1/unordered_map>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <osg/Group>
|
#include <osg/Group>
|
||||||
#include <osg/ComputeBoundsVisitor>
|
#include <osg/ComputeBoundsVisitor>
|
||||||
|
|
||||||
|
@ -108,11 +100,7 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
#ifdef HAVE_UNORDERED_MAP
|
typedef std::map<std::string, ContentLoader*> LoadersContainer;
|
||||||
typedef std::unordered_map<std::string, ContentLoader*> LoadersContainer;
|
|
||||||
#else
|
|
||||||
typedef std::tr1::unordered_map<std::string, ContentLoader*> LoadersContainer;
|
|
||||||
#endif
|
|
||||||
LoadersContainer mLoaders;
|
LoadersContainer mLoaders;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,7 @@
|
||||||
#ifndef COMPONENTS_FILES_CONFIGURATIONMANAGER_HPP
|
#ifndef COMPONENTS_FILES_CONFIGURATIONMANAGER_HPP
|
||||||
#define COMPONENTS_FILES_CONFIGURATIONMANAGER_HPP
|
#define COMPONENTS_FILES_CONFIGURATIONMANAGER_HPP
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(__MINGW32__)
|
#include <map>
|
||||||
#include <boost/tr1/tr1/unordered_map>
|
|
||||||
#elif defined HAVE_UNORDERED_MAP
|
|
||||||
#include <unordered_map>
|
|
||||||
#else
|
|
||||||
#include <tr1/unordered_map>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <boost/program_options.hpp>
|
#include <boost/program_options.hpp>
|
||||||
|
|
||||||
|
@ -52,11 +46,7 @@ struct ConfigurationManager
|
||||||
typedef Files::FixedPath<> FixedPathType;
|
typedef Files::FixedPath<> FixedPathType;
|
||||||
|
|
||||||
typedef const boost::filesystem::path& (FixedPathType::*path_type_f)() const;
|
typedef const boost::filesystem::path& (FixedPathType::*path_type_f)() const;
|
||||||
#if defined HAVE_UNORDERED_MAP
|
typedef std::map<std::string, path_type_f> TokensMappingContainer;
|
||||||
typedef std::unordered_map<std::string, path_type_f> TokensMappingContainer;
|
|
||||||
#else
|
|
||||||
typedef std::tr1::unordered_map<std::string, path_type_f> TokensMappingContainer;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
bool loadConfig(const boost::filesystem::path& path,
|
bool loadConfig(const boost::filesystem::path& path,
|
||||||
boost::program_options::variables_map& variables,
|
boost::program_options::variables_map& variables,
|
||||||
|
|
Loading…
Reference in a new issue