mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-04-29 19:44:49 +02: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
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# BOOST UNORDERED
|
|
||||||
global_include_dirs += include_directories('boost-unordered')
|
|
||||||
|
|
||||||
# GLES
|
# GLES
|
||||||
gfx_backend = get_option('gfx_backend')
|
gfx_backend = get_option('gfx_backend')
|
||||||
if gfx_backend == 'gles'
|
if gfx_backend == 'gles'
|
||||||
|
|
|
@ -25,6 +25,8 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
/* Equivalent Linear Congruential Generator (LCG) constants for iteration 2^n
|
/* Equivalent Linear Congruential Generator (LCG) constants for iteration 2^n
|
||||||
* all the way up to 2^32/4 (the largest dword offset possible in
|
* all the way up to 2^32/4 (the largest dword offset possible in
|
||||||
* RGSS{AD,[23]A}).
|
* RGSS{AD,[23]A}).
|
||||||
|
|
|
@ -22,8 +22,10 @@
|
||||||
#ifndef BOOSTHASH_H
|
#ifndef BOOSTHASH_H
|
||||||
#define 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>
|
#include <utility>
|
||||||
|
|
||||||
|
@ -34,12 +36,10 @@ template<typename K, typename V>
|
||||||
class BoostHash
|
class BoostHash
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef boost::unordered_map<K, V> BoostType;
|
std::map<K, V> p = {};
|
||||||
typedef std::pair<K, V> PairType;
|
|
||||||
BoostType p;
|
|
||||||
|
|
||||||
public:
|
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
|
inline bool contains(const K &key) const
|
||||||
{
|
{
|
||||||
|
@ -50,7 +50,8 @@ public:
|
||||||
|
|
||||||
inline void insert(const K &key, const V &value)
|
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)
|
inline void remove(const K &key)
|
||||||
|
@ -103,11 +104,11 @@ template<typename K>
|
||||||
class BoostSet
|
class BoostSet
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
typedef boost::unordered_set<K> BoostType;
|
//typedef std::unordered_set<K> BoostType;
|
||||||
BoostType p;
|
std::set<K> p;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef typename BoostType::const_iterator const_iterator;
|
typedef typename std::set<K>::const_iterator const_iterator;
|
||||||
|
|
||||||
inline bool contains(const K &key)
|
inline bool contains(const K &key)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue