mirror of
https://github.com/glest/glest-source.git
synced 2025-09-26 15:39:21 +02:00
- a few code cleanup items while doing some testing in VC++ 2010
This commit is contained in:
@@ -285,12 +285,12 @@ XmlNode *XmlIoRapid::load(const string &path, std::map<string,string> mapTagRepl
|
||||
|
||||
// Determine stream size
|
||||
xmlFile.seekg(0, ios::end);
|
||||
size_t size = xmlFile.tellg();
|
||||
streampos size = xmlFile.tellg();
|
||||
xmlFile.seekg(0);
|
||||
|
||||
// Load data and add terminating 0
|
||||
vector<char> buffer;
|
||||
buffer.resize(size + 1);
|
||||
buffer.resize(size + (streampos)1);
|
||||
xmlFile.read(&buffer.front(), static_cast<streamsize>(size));
|
||||
buffer[size] = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user