Removed an extra vector allocation from the previous card loading optimization.

This commit is contained in:
wrenczes@gmail.com
2010-10-06 08:53:05 +00:00
parent 88ac1dd9a6
commit 1e7f2507f0

View File

@@ -264,11 +264,10 @@ int MTGAllCards::load(const char * config_file, const char * set_name,int autolo
streampos fileSize = setFile.tellg();
setFile.seekg(0, ios::beg);
std::vector<char> textVector;
textVector.resize((std::vector<char>::size_type) fileSize);
setFile.read(&textVector[0], fileSize);
std::stringstream stream(std::string(textVector.begin(), textVector.end()));
std::string contents;
contents.resize((std::string::size_type)fileSize);
setFile.read(&contents[0], fileSize);
std::stringstream stream(contents);
string s;