Fix a bunch of mac compilation issues in performance branch

This commit is contained in:
kailiu
2013-12-04 23:00:33 -08:00
parent 219b35be6a
commit e1d92dfd2e
4 changed files with 6 additions and 5 deletions

View File

@@ -23,8 +23,7 @@ namespace rocksdb {
PlainTableBuilder::PlainTableBuilder(const Options& options,
WritableFile* file,
int user_key_size, int key_prefix_len) :
options_(options), file_(file), user_key_size_(user_key_size),
key_prefix_len_(key_prefix_len) {
options_(options), file_(file), user_key_size_(user_key_size) {
std::string version;
PutFixed32(&version, 1 | 0x80000000);
file_->Append(Slice(version));

View File

@@ -75,7 +75,6 @@ private:
uint64_t num_entries_ = 0;
const size_t user_key_size_;
const size_t key_prefix_len_;
bool closed_ = false; // Either Finish() or Abandon() has been called.
int GetInternalKeyLength() {

View File

@@ -40,7 +40,8 @@ public:
class slice_comparator {
public:
bool operator()(rocksdb::Slice const& s1, rocksdb::Slice const& s2) {
bool operator()(rocksdb::Slice const& s1,
rocksdb::Slice const& s2) const {
return s1.compare(s2) < 0;
}
};