0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-28 01:04:41 +08:00

Linux build without copy

This commit is contained in:
Victor Zarubkin 2016-09-27 01:07:13 +03:00
parent 7e4e921403
commit e317d006a0

View File

@ -240,14 +240,14 @@ extern "C" {
::std::stringstream str;
#ifdef _WIN32
str.set_rdbuf(inFile.rdbuf());
#else
str << inFile.rdbuf();
inFile.close();
#endif
typedef ::std::basic_iostream<::std::stringstream::char_type, ::std::stringstream::traits_type> stringstream_parent;
stringstream_parent& s = str;
auto oldbuf = s.rdbuf(inFile.rdbuf());
return fillTreesFromStream(progress, str, serialized_blocks, serialized_descriptors, descriptors, blocks, threaded_trees, gather_statistics);
auto result = fillTreesFromStream(progress, str, serialized_blocks, serialized_descriptors, descriptors, blocks, threaded_trees, gather_statistics);
s.rdbuf(oldbuf);
return result;
}
//////////////////////////////////////////////////////////////////////////