diff options
Diffstat (limited to 'util/cache.cc')
-rw-r--r-- | util/cache.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/util/cache.cc b/util/cache.cc index 12de306..ad1e9a2 100644 --- a/util/cache.cc +++ b/util/cache.cc @@ -2,11 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#include <assert.h> -#include <stdio.h> -#include <stdlib.h> - #include "leveldb/cache.h" + +#include <cassert> +#include <cstdio> +#include <cstdlib> + #include "port/port.h" #include "port/thread_annotations.h" #include "util/hash.h" @@ -278,7 +279,7 @@ Cache::Handle* LRUCache::Insert(const Slice& key, uint32_t hash, void* value, e->hash = hash; e->in_cache = false; e->refs = 1; // for the returned handle. - memcpy(e->key_data, key.data(), key.size()); + std::memcpy(e->key_data, key.data(), key.size()); if (capacity_ > 0) { e->refs++; // for the cache's reference. |