Bläddra i källkod

XMLReaderData() now check for error.

adeniz_1
Alban Deniz 6 månader sedan
förälder
incheckning
21917e05b5
1 ändrade filer med 2 tillägg och 0 borttagningar
  1. 2
    0
      XMLReader.cpp

+ 2
- 0
XMLReader.cpp Visa fil

@@ -1229,6 +1229,8 @@ XMLReaderData::XMLReaderData(const string FileName) :
ifstream CFGFile(FileName.c_str()); // Open the file.
CFGFile.seekg(0,ios::end); // Seek to the end
myBufferSize = CFGFile.tellg(); // to find out what size it is.
if (myBufferSize < 0)
throw;
myDataBuffer = new char[myBufferSize + 1]; // Make a new buffer the right size,
// including null byte at end.
CFGFile.seekg(0,ios::beg); // Seek to the beginning and

Laddar…
Avbryt
Spara