Skip to content

Commit

Permalink
Fixes for g++ 4.9.2 compatibility (facebook#6053)
Browse files Browse the repository at this point in the history
Summary:
Taken from merryChris in facebook#6043

Stackoverflow ref on {{}} vs. {}:
https://stackoverflow.com/questions/26947704/implicit-conversion-failure-from-initializer-list

Note to reader: .clear() does not empty out an ostringstream, but .str("")
suffices because we don't have to worry about clearing error flags.
Pull Request resolved: facebook#6053

Test Plan: make check, manual run of filter_bench

Differential Revision: D18602259

Pulled By: pdillinger

fbshipit-source-id: f6190f83b8eab4e80e7c107348839edabe727841
  • Loading branch information
pdillinger authored and facebook-github-bot committed Nov 19, 2019
1 parent e213dd4 commit c8e85d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db/compaction/compaction_iterator_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ class TestSnapshotChecker : public SnapshotChecker {
public:
explicit TestSnapshotChecker(
SequenceNumber last_committed_sequence,
const std::unordered_map<SequenceNumber, SequenceNumber>& snapshots = {})
const std::unordered_map<SequenceNumber, SequenceNumber>& snapshots = {{}})
: last_committed_sequence_(last_committed_sequence),
snapshots_(snapshots) {}

Expand Down
2 changes: 1 addition & 1 deletion util/filter_bench.cc
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ double FilterBench::RandomQueryTest(uint32_t inside_threshold, bool dry_run,
}

if (!dry_run) {
fp_rate_report_ = std::ostringstream();
fp_rate_report_.str("");
uint64_t q = 0;
uint64_t fp = 0;
double worst_fp_rate = 0.0;
Expand Down

0 comments on commit c8e85d9

Please sign in to comment.