1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 18:23:08 +02:00

Use tr1::unordered_map instead of google::dense_hash_map in class GMenu2X.

This reduces the binary size by about 260K.
This commit is contained in:
Maarten ter Huurne 2010-07-28 03:31:41 +02:00
parent 4dade329f7
commit 4ddc189847
3 changed files with 12 additions and 16 deletions

View File

@ -21,6 +21,7 @@
#include <iostream>
#include <sstream>
#include <fstream>
#include <algorithm>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
@ -170,15 +171,6 @@ GMenu2X::GMenu2X() {
f200 = true;
#endif
confStr.set_empty_key(" ");
confStr.set_deleted_key("");
confInt.set_empty_key(" ");
confInt.set_deleted_key("");
skinConfInt.set_empty_key(" ");
skinConfInt.set_deleted_key("");
skinConfStr.set_empty_key(" ");
skinConfStr.set_deleted_key("");
//open2x
savedVolumeMode = 0;
volumeMode = VOLUME_MODE_NORMAL;

View File

@ -21,10 +21,6 @@
#ifndef GMENU2X_H
#define GMENU2X_H
#include <string>
#include <iostream>
#include "google/dense_hash_map"
#include "surfacecollection.h"
#include "iconbutton.h"
#include "translator.h"
@ -35,6 +31,11 @@
#include "asfont.h"
#include "surface.h"
#include <iostream>
#include <string>
#include <vector>
#include <tr1/unordered_map>
const int MAX_VOLUME_SCALE_FACTOR = 200;
// Default values - going to add settings adjustment, saving, loading and such
const int VOLUME_SCALER_MUTE = 0;
@ -63,12 +64,12 @@ enum color {
};
using std::string;
using std::vector;
using fastdelegate::FastDelegate0;
using google::dense_hash_map;
typedef FastDelegate0<> MenuAction;
typedef dense_hash_map<string, string, hash<string> > ConfStrHash;
typedef dense_hash_map<string, int, hash<string> > ConfIntHash;
typedef unordered_map<string, string, hash<string> > ConfStrHash;
typedef unordered_map<string, int, hash<string> > ConfIntHash;
typedef struct {
unsigned short batt;

View File

@ -22,6 +22,9 @@
#include "iconbutton.h"
#include "FastDelegate.h"
#include <algorithm>
using std::find;
using std::string;
using std::vector;
using fastdelegate::MakeDelegate;