1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-26 02:51:53 +02:00

Use tr1::unordered_map instead of google::dense_hash_map in SurfaceCollection.

This reduces the binary size by about 45K.
This commit is contained in:
Maarten ter Huurne 2010-07-28 03:16:40 +02:00
parent c84fea65a2
commit 4dade329f7
2 changed files with 2 additions and 4 deletions

View File

@ -27,8 +27,6 @@ using std::endl;
using std::string; using std::string;
SurfaceCollection::SurfaceCollection(bool defaultAlpha, const string &skin) { SurfaceCollection::SurfaceCollection(bool defaultAlpha, const string &skin) {
surfaces.set_empty_key(" ");
surfaces.set_deleted_key("");
this->defaultAlpha = defaultAlpha; this->defaultAlpha = defaultAlpha;
setSkin(skin); setSkin(skin);
} }

View File

@ -20,12 +20,12 @@
#ifndef SURFACECOLLECTION_H #ifndef SURFACECOLLECTION_H
#define SURFACECOLLECTION_H #define SURFACECOLLECTION_H
#include <google/dense_hash_map>
#include <string> #include <string>
#include <tr1/unordered_map>
class Surface; class Surface;
typedef google::dense_hash_map<std::string, Surface *> SurfaceHash; typedef std::tr1::unordered_map<std::string, Surface *> SurfaceHash;
/** /**
Hash Map of surfaces that loads surfaces not already loaded and reuses already loaded ones. Hash Map of surfaces that loads surfaces not already loaded and reuses already loaded ones.