Procházet zdrojové kódy

XMLReaderData() now check for error.

adeniz_1
Alban Deniz před 2 roky
rodič
revize
21917e05b5
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2
    0
      XMLReader.cpp

+ 2
- 0
XMLReader.cpp Zobrazit soubor

ifstream CFGFile(FileName.c_str()); // Open the file. ifstream CFGFile(FileName.c_str()); // Open the file.
CFGFile.seekg(0,ios::end); // Seek to the end CFGFile.seekg(0,ios::end); // Seek to the end
myBufferSize = CFGFile.tellg(); // to find out what size it is. 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, myDataBuffer = new char[myBufferSize + 1]; // Make a new buffer the right size,
// including null byte at end. // including null byte at end.
CFGFile.seekg(0,ios::beg); // Seek to the beginning and CFGFile.seekg(0,ios::beg); // Seek to the beginning and

Načítá se…
Zrušit
Uložit