table/bloom_block.*: pass func parameter by reference

[table/bloom_block.h:29]: (performance) Function parameter
 'keys_hashes' should be passed by reference.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
main
Danny Al-Gaaf 10 years ago
parent 53910ddb15
commit 8ce050b51b
  1. 2
      table/bloom_block.cc
  2. 2
      table/bloom_block.h

@ -11,7 +11,7 @@
namespace rocksdb { namespace rocksdb {
void BloomBlockBuilder::AddKeysHashes(const std::vector<uint32_t> keys_hashes) { void BloomBlockBuilder::AddKeysHashes(const std::vector<uint32_t>& keys_hashes) {
for (auto hash : keys_hashes) { for (auto hash : keys_hashes) {
bloom_.AddHash(hash); bloom_.AddHash(hash);
} }

@ -26,7 +26,7 @@ class BloomBlockBuilder {
uint32_t GetNumBlocks() const { return bloom_.GetNumBlocks(); } uint32_t GetNumBlocks() const { return bloom_.GetNumBlocks(); }
void AddKeysHashes(const std::vector<uint32_t> keys_hashes); void AddKeysHashes(const std::vector<uint32_t>& keys_hashes);
Slice Finish(); Slice Finish();

Loading…
Cancel
Save