mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-03-28 14:56:22 +01:00
Remove boost::unordered dependency (it broke)
This commit is contained in:
parent
4083ce1b57
commit
7ecad29d77
5 changed files with 13 additions and 17 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -1,3 +0,0 @@
|
|||
[submodule "boost-unordered"]
|
||||
path = boost-unordered
|
||||
url = https://gitlab.com/mkxp-z/boost-unordered.git
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 873377396eb173eebba30b753cb26d18abc2861d
|
|
@ -60,9 +60,6 @@ if steamworks_path != ''
|
|||
endif
|
||||
endif
|
||||
|
||||
# BOOST UNORDERED
|
||||
global_include_dirs += include_directories('boost-unordered')
|
||||
|
||||
# GLES
|
||||
gfx_backend = get_option('gfx_backend')
|
||||
if gfx_backend == 'gles'
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <string>
|
||||
|
||||
/* Equivalent Linear Congruential Generator (LCG) constants for iteration 2^n
|
||||
* all the way up to 2^32/4 (the largest dword offset possible in
|
||||
* RGSS{AD,[23]A}).
|
||||
|
|
|
@ -22,8 +22,10 @@
|
|||
#ifndef BOOSTHASH_H
|
||||
#define BOOSTHASH_H
|
||||
|
||||
#include <boost/unordered/unordered_map.hpp>
|
||||
#include <boost/unordered/unordered_set.hpp>
|
||||
|
||||
// Need to use Map and Set, unordered can't handle pair apparently
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
@ -34,12 +36,10 @@ template<typename K, typename V>
|
|||
class BoostHash
|
||||
{
|
||||
private:
|
||||
typedef boost::unordered_map<K, V> BoostType;
|
||||
typedef std::pair<K, V> PairType;
|
||||
BoostType p;
|
||||
std::map<K, V> p = {};
|
||||
|
||||
public:
|
||||
typedef typename BoostType::const_iterator const_iterator;
|
||||
typedef typename std::map<K, V>::const_iterator const_iterator;
|
||||
|
||||
inline bool contains(const K &key) const
|
||||
{
|
||||
|
@ -50,7 +50,8 @@ public:
|
|||
|
||||
inline void insert(const K &key, const V &value)
|
||||
{
|
||||
p.insert(PairType(key, value));
|
||||
p[key] = value;
|
||||
//p.insert(std::pair<K, V>(key, value));
|
||||
}
|
||||
|
||||
inline void remove(const K &key)
|
||||
|
@ -103,11 +104,11 @@ template<typename K>
|
|||
class BoostSet
|
||||
{
|
||||
private:
|
||||
typedef boost::unordered_set<K> BoostType;
|
||||
BoostType p;
|
||||
//typedef std::unordered_set<K> BoostType;
|
||||
std::set<K> p;
|
||||
|
||||
public:
|
||||
typedef typename BoostType::const_iterator const_iterator;
|
||||
typedef typename std::set<K>::const_iterator const_iterator;
|
||||
|
||||
inline bool contains(const K &key)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue