| 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 | ||
|---|---|---|
| 27 | 27 | using std::string; |
| 28 | 28 | |
| 29 | 29 | SurfaceCollection::SurfaceCollection(bool defaultAlpha, const string &skin) { |
| 30 | surfaces.set_empty_key(" "); | |
| 31 | surfaces.set_deleted_key(""); | |
| 32 | 30 | this->defaultAlpha = defaultAlpha; |
| 33 | 31 | setSkin(skin); |
| 34 | 32 | } |
| src/surfacecollection.h | ||
|---|---|---|
| 20 | 20 | #ifndef SURFACECOLLECTION_H |
| 21 | 21 | #define SURFACECOLLECTION_H |
| 22 | 22 | |
| 23 | #include <google/dense_hash_map> | |
| 24 | 23 | #include <string> |
| 24 | #include <tr1/unordered_map> | |
| 25 | 25 | |
| 26 | 26 | class Surface; |
| 27 | 27 | |
| 28 | typedef google::dense_hash_map<std::string, Surface *> SurfaceHash; | |
| 28 | typedef std::tr1::unordered_map<std::string, Surface *> SurfaceHash; | |
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | Hash Map of surfaces that loads surfaces not already loaded and reuses already loaded ones. |
Branches:
install_locations
master
opkrun
packages
