Remove boost::unordered dependency (it broke)

This commit is contained in:
Struma 2022-07-05 19:16:52 -04:00
parent 4083ce1b57
commit 7ecad29d77
5 changed files with 13 additions and 17 deletions

3
.gitmodules vendored
View file

@ -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

View file

@ -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'

View file

@ -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}).

View file

@ -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)
{