small XMLFile cleanup

svn path=/branches/xmlbuildsystem/; revision=12821
This commit is contained in:
Royce Mitchell III 2005-01-05 17:59:08 +00:00
parent 039d7779de
commit 5793157884
2 changed files with 1 additions and 7 deletions

View file

@ -191,11 +191,6 @@ XMLFile::XMLFile()
void void
XMLFile::close() XMLFile::close()
{ {
while ( _f.size() )
{
fclose ( _f.back() );
_f.pop_back();
}
_buf.resize(0); _buf.resize(0);
_p = _end = NULL; _p = _end = NULL;
} }
@ -210,9 +205,9 @@ XMLFile::open(const string& filename)
unsigned long len = (unsigned long)filelen(f); unsigned long len = (unsigned long)filelen(f);
_buf.resize ( len ); _buf.resize ( len );
fread ( &_buf[0], 1, len, f ); fread ( &_buf[0], 1, len, f );
fclose ( f );
_p = _buf.c_str(); _p = _buf.c_str();
_end = _p + len; _end = _p + len;
_f.push_back ( f );
next_token(); next_token();
return true; return true;
} }

View file

@ -36,7 +36,6 @@ public:
bool get_token(std::string& token); bool get_token(std::string& token);
private: private:
std::vector<FILE*> _f;
std::string _buf; std::string _buf;
const char *_p, *_end; const char *_p, *_end;