| 4022 | |
| 4023 | template<typename T> |
| 4024 | PUGI__FN xml_parse_result |
| 4025 | load_stream_impl(xml_document& doc, std::basic_istream<T>& stream, unsigned int options, xml_encoding encoding) |
| 4026 | { |
| 4027 | void* buffer = nullptr; |
| 4028 | size_t size = 0; |
| 4029 | |
| 4030 | // load stream to memory (using seek-based implementation if possible, since it's faster and takes less memory) |
| 4031 | xml_parse_status status = (stream.tellg() < 0) |
| 4032 | ? load_stream_data_noseek(stream, &buffer, &size) |
| 4033 | : load_stream_data_seek(stream, &buffer, &size); |
| 4034 | if (status != status_ok) |
| 4035 | return make_parse_result(status); |
| 4036 | |
| 4037 | return doc.load_buffer_inplace_own(buffer, size, options, encoding); |
| 4038 | } |
| 4039 | #endif |
| 4040 | |
| 4041 | #if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__) || (defined(__MINGW32__) && !defined(__STRICT_ANSI__)) |
nothing calls this directly
no test coverage detected