Fix Mac OS compile issues
This commit is contained in:
parent
5b345b76cb
commit
34455deb06
@ -814,7 +814,6 @@ class Benchmark {
|
|||||||
int64_t writes_;
|
int64_t writes_;
|
||||||
int64_t readwrites_;
|
int64_t readwrites_;
|
||||||
int64_t merge_keys_;
|
int64_t merge_keys_;
|
||||||
int heap_counter_;
|
|
||||||
void PrintHeader() {
|
void PrintHeader() {
|
||||||
PrintEnvironment();
|
PrintEnvironment();
|
||||||
fprintf(stdout, "Keys: %d bytes each\n", FLAGS_key_size);
|
fprintf(stdout, "Keys: %d bytes each\n", FLAGS_key_size);
|
||||||
@ -1011,8 +1010,7 @@ class Benchmark {
|
|||||||
readwrites_((FLAGS_writes < 0 && FLAGS_reads < 0)? FLAGS_num :
|
readwrites_((FLAGS_writes < 0 && FLAGS_reads < 0)? FLAGS_num :
|
||||||
((FLAGS_writes > FLAGS_reads) ? FLAGS_writes : FLAGS_reads)
|
((FLAGS_writes > FLAGS_reads) ? FLAGS_writes : FLAGS_reads)
|
||||||
),
|
),
|
||||||
merge_keys_(FLAGS_merge_keys < 0 ? FLAGS_num : FLAGS_merge_keys),
|
merge_keys_(FLAGS_merge_keys < 0 ? FLAGS_num : FLAGS_merge_keys) {
|
||||||
heap_counter_(0) {
|
|
||||||
if (FLAGS_prefix_size > FLAGS_key_size) {
|
if (FLAGS_prefix_size > FLAGS_key_size) {
|
||||||
fprintf(stderr, "prefix size is larger than key size");
|
fprintf(stderr, "prefix size is larger than key size");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -267,15 +267,14 @@ void MergingIterator::ClearHeaps() {
|
|||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
Iterator* NewMergingIterator(Env* const env, const Comparator* cmp,
|
Iterator* NewMergingIterator(const Comparator* cmp, Iterator** list, int n) {
|
||||||
Iterator** list, int n) {
|
|
||||||
assert(n >= 0);
|
assert(n >= 0);
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
return NewEmptyIterator();
|
return NewEmptyIterator();
|
||||||
} else if (n == 1) {
|
} else if (n == 1) {
|
||||||
return list[0];
|
return list[0];
|
||||||
} else {
|
} else {
|
||||||
return new MergingIterator(env, cmp, list, n);
|
return new MergingIterator(cmp, list, n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user