Skip to content

Commit

Permalink
ISSUE #654 Minor tweaks to compile on GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
sebjf committed Jan 9, 2024
1 parent 17ff62a commit aa66fa8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@ bool FileManager::uploadFileAndCommit(
// Bufferstream operates directly over the user provided array
boost::interprocess::bufferstream uncompressed((char*)bin.data(), bin.size());

// In stream form for filtering_istream
std::istream uncompressedStream(uncompressed.rdbuf());

boost::iostreams::filtering_istream in;
in.push(boost::iostreams::gzip_compressor());
in.push(std::istream(uncompressed.rdbuf())); // For some reason bufferstream is ambigous between stream and streambuf, so wrap it unambiguously
in.push(uncompressedStream); // For some reason bufferstream is ambigous between stream and streambuf, so wrap it unambiguously

boost::iostreams::copy(in, compressedstream);

Expand All @@ -85,7 +88,8 @@ bool FileManager::uploadFileAndCommit(

repo::core::model::RepoBSONBuilder builder;
builder.append("encoding", "gzip");
fileMetadata = metadata.cloneAndAddFields(&builder.obj());
auto bson = builder.obj();
fileMetadata = metadata.cloneAndAddFields(&bson);
}
break;
}
Expand Down
2 changes: 1 addition & 1 deletion bouncer/src/repo/lib/datastructure/repo_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
using repo_web_geo_files_t = std::unordered_map<std::string, std::vector<uint8_t>>;
using repo_web_json_files_t = std::unordered_map<std::string, std::vector<uint8_t>>;

using repo_web_buffers_t = struct {
struct repo_web_buffers_t{
repo_web_geo_files_t geoFiles; //files where geometery are stored
repo_web_json_files_t jsonFiles; //JSON mapping files
repo::core::model::RepoUnityAssets unityAssets; //Unity assets list
Expand Down

0 comments on commit aa66fa8

Please sign in to comment.