MCPcopy Create free account
hub / github.com/MediaArea/MediaInfoLib / LoadFile

Method LoadFile

Source/ThirdParty/tinyxml2/tinyxml2.cpp:2159–2176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

callfopenFunction · 0.85

Tested by

no test coverage detected