MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / LoadFile

Method LoadFile

Dependencies/tinyxml2/src/tinyxml2.cpp:2164–2181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2162
2163
2164XMLError XMLDocument::LoadFile( const char* filename )
2165{
2166 if ( !filename ) {
2167 TIXMLASSERT( false );
2168 SetError( XML_ERROR_FILE_COULD_NOT_BE_OPENED, 0, "filename=<null>" );
2169 return _errorID;
2170 }
2171
2172 Clear();
2173 FILE* fp = callfopen( filename, "rb" );
2174 if ( !fp ) {
2175 SetError( XML_ERROR_FILE_NOT_FOUND, 0, "filename=%s", filename );
2176 return _errorID;
2177 }
2178 LoadFile( fp );
2179 fclose( fp );
2180 return _errorID;
2181}
2182
2183// This is likely overengineered template art to have a check that unsigned long value incremented
2184// by one still fits into size_t. If size_t type is larger than unsigned long type

Callers 3

CreateMethod · 0.80
ReloadMethod · 0.80
LoadSceneMethod · 0.80

Calls 2

ClearFunction · 0.85
callfopenFunction · 0.85

Tested by

no test coverage detected