Date:2010-07-28 03:16:40 (13 years 4 months ago)
Author:Maarten ter Huurne
Commit:4dade329f7636d32f7cc606280b33db14b4a585d
Message:Use tr1::unordered_map instead of google::dense_hash_map in SurfaceCollection.

This reduces the binary size by about 45K.
Files: src/surfacecollection.cpp (1 diff)
src/surfacecollection.h (1 diff)

Change Details

src/surfacecollection.cpp
2727using std::string;
2828
2929SurfaceCollection::SurfaceCollection(bool defaultAlpha, const string &skin) {
30    surfaces.set_empty_key(" ");
31    surfaces.set_deleted_key("");
3230    this->defaultAlpha = defaultAlpha;
3331    setSkin(skin);
3432}
src/surfacecollection.h
2020#ifndef SURFACECOLLECTION_H
2121#define SURFACECOLLECTION_H
2222
23#include <google/dense_hash_map>
2423#include <string>
24#include <tr1/unordered_map>
2525
2626class Surface;
2727
28typedef google::dense_hash_map<std::string, Surface *> SurfaceHash;
28typedef std::tr1::unordered_map<std::string, Surface *> SurfaceHash;
2929
3030/**
3131Hash Map of surfaces that loads surfaces not already loaded and reuses already loaded ones.

Archive Download the corresponding diff file



interactive