MCPcopy Create free account
hub / github.com/crossuo/crossuo / LoadFile

Method LoadFile

external/tinyxml2.cpp:2284–2301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2282
2283
2284XMLError XMLDocument::LoadFile( const char* filename )
2285{
2286 if ( !filename ) {
2287 TIXMLASSERT( false );
2288 SetError( XML_ERROR_FILE_COULD_NOT_BE_OPENED, 0, "filename=<null>" );
2289 return _errorID;
2290 }
2291
2292 Clear();
2293 FILE* fp = callfopen( filename, "rb" );
2294 if ( !fp ) {
2295 SetError( XML_ERROR_FILE_NOT_FOUND, 0, "filename=%s", filename );
2296 return _errorID;
2297 }
2298 LoadFile( fp );
2299 fclose( fp );
2300 return _errorID;
2301}
2302
2303// This is likely overengineered template art to have a check that unsigned long value incremented
2304// by one still fits into size_t. If size_t type is larger than unsigned long type

Callers

nothing calls this directly

Calls 2

ClearFunction · 0.85
callfopenFunction · 0.85

Tested by

no test coverage detected