mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-12 19:58:29 +00:00
removed hash_map usage
This commit is contained in:
parent
e86e393967
commit
70a01ca3e2
42
hash_map.h
42
hash_map.h
@ -1,42 +0,0 @@
|
||||
// Residual - Virtual machine to run LucasArts' 3D adventure games
|
||||
// Copyright (C) 2003 The ScummVM-Residual Team (www.scummvm.org)
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
#ifndef HASH_MAP_HH
|
||||
#define HASH_MAP_HH
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <hash_map>
|
||||
#else
|
||||
#include <ext/hash_map>
|
||||
#endif
|
||||
#include <string>
|
||||
|
||||
#ifndef _MSC_VER
|
||||
namespace std {
|
||||
using namespace __gnu_cxx;
|
||||
};
|
||||
|
||||
namespace __gnu_cxx {
|
||||
template<> struct hash<std::string> {
|
||||
size_t operator()(const std::string &s) const {
|
||||
return std::hash<const char *>()(s.c_str());
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
4
lab.h
4
lab.h
@ -20,7 +20,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <cstdio>
|
||||
#include "hash_map.h"
|
||||
#include <map>
|
||||
|
||||
class Block {
|
||||
public:
|
||||
@ -60,7 +60,7 @@ private:
|
||||
};
|
||||
|
||||
std::FILE *f_;
|
||||
typedef std::hash_map<std::string, LabEntry> file_map_type;
|
||||
typedef std::map<std::string, LabEntry> file_map_type;
|
||||
file_map_type file_map_;
|
||||
|
||||
file_map_type::const_iterator find_filename(const char *filename) const;
|
||||
|
@ -18,7 +18,8 @@
|
||||
#ifndef LOCALIZE_H
|
||||
#define LOCALIZE_H
|
||||
|
||||
#include "hash_map.h"
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
class Localizer {
|
||||
public:
|
||||
@ -32,7 +33,7 @@ private:
|
||||
|
||||
static Localizer *instance_;
|
||||
|
||||
typedef std::hash_map<std::string, std::string> string_map;
|
||||
typedef std::map<std::string, std::string> string_map;
|
||||
string_map entries_;
|
||||
};
|
||||
|
||||
|
@ -163,9 +163,6 @@
|
||||
<File
|
||||
RelativePath="engine.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="hash_map.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="keyframe.cpp">
|
||||
</File>
|
||||
|
@ -19,7 +19,7 @@
|
||||
#define RESOURCE_H
|
||||
|
||||
#include "lab.h"
|
||||
#include "hash_map.h"
|
||||
#include "map"
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
||||
@ -114,7 +114,7 @@ private:
|
||||
|
||||
const Lab *findFile(const char *filename) const;
|
||||
|
||||
typedef std::hash_map<std::string, Resource *> cache_type;
|
||||
typedef std::map<std::string, Resource *> cache_type;
|
||||
cache_type cache_;
|
||||
|
||||
// Shut up pointless g++ warning
|
||||
|
Loading…
x
Reference in New Issue
Block a user