J :
* Improve loading performance by about 25%.
- This is certainly not the kind of change I was aiming at, but it
just happened to get done, so why not commit it.
- Little point for users in this change actually, since the loading
times get down from 15 to 11 secs or so, it's not even that
obvious.
- I get about 25% on my PSP. Valgrind reports 36% improvement on PC.
I wish it was the opposite ;_;
- Feedback welcome
This commit is contained in:
@@ -42,20 +42,20 @@ class CardPrimitive {
|
||||
|
||||
int has(int ability);
|
||||
|
||||
void setText(string value);
|
||||
void setText(const string& value);
|
||||
const char * getText();
|
||||
|
||||
void addMagicText(string value);
|
||||
void addMagicText(string value, string zone);
|
||||
|
||||
void setName(string value);
|
||||
void setName(const string& value);
|
||||
const string getName() const;
|
||||
const string getLCName() const;
|
||||
|
||||
void addType(char * type_text);
|
||||
void addType(int id);
|
||||
void setType(const char * type_text);
|
||||
void setSubtype( string value);
|
||||
void setType(const string& type_text);
|
||||
void setSubtype(const string& value);
|
||||
int removeType(string value, int removeAll = 0);
|
||||
int removeType(int value, int removeAll = 0);
|
||||
bool hasSubtype(int _subtype);
|
||||
|
||||
@@ -109,11 +109,10 @@ private:
|
||||
int countByType(const char * _type);
|
||||
int countByColor(int color);
|
||||
int countBySet(int setId);
|
||||
int readConfLine(ifstream &file, int set_id);
|
||||
int totalCards();
|
||||
int randomCardId();
|
||||
private:
|
||||
int processConfLine(string s, MTGCard* card, CardPrimitive * primitive);
|
||||
int processConfLine(string &s, MTGCard* card, CardPrimitive * primitive);
|
||||
bool addCardToCollection(MTGCard * card, int setId);
|
||||
CardPrimitive * addPrimitive(CardPrimitive * primitive, MTGCard * card = NULL);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user