Skip to content

Commit 8ce050b

Browse files
committed
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>
1 parent 53910dd commit 8ce050b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

table/bloom_block.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace rocksdb {
1313

14-
void BloomBlockBuilder::AddKeysHashes(const std::vector<uint32_t> keys_hashes) {
14+
void BloomBlockBuilder::AddKeysHashes(const std::vector<uint32_t>& keys_hashes) {
1515
for (auto hash : keys_hashes) {
1616
bloom_.AddHash(hash);
1717
}

table/bloom_block.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class BloomBlockBuilder {
2626

2727
uint32_t GetNumBlocks() const { return bloom_.GetNumBlocks(); }
2828

29-
void AddKeysHashes(const std::vector<uint32_t> keys_hashes);
29+
void AddKeysHashes(const std::vector<uint32_t>& keys_hashes);
3030

3131
Slice Finish();
3232

0 commit comments

Comments
 (0)