Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pir/hashing/cuckoo_hash_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace distributed_point_functions {

CuckooHashTable::CuckooHashTable(std::vector<HashFunction> hash_functions,
int num_buckets, int max_relocations,
absl::optional<int> max_stash_size)
std::optional<int> max_stash_size)
: num_buckets_(num_buckets),
max_relocations_(max_relocations),
max_stash_size_(max_stash_size),
Expand All @@ -46,7 +46,7 @@ CuckooHashTable::CuckooHashTable(std::vector<HashFunction> hash_functions,

absl::StatusOr<std::unique_ptr<CuckooHashTable>> CuckooHashTable::Create(
std::vector<HashFunction> hash_functions, int num_buckets,
int max_relocations, absl::optional<int> max_stash_size) {
int max_relocations, std::optional<int> max_stash_size) {
if (num_buckets <= 0) {
return absl::InvalidArgumentError("num_buckets must be positive");
}
Expand Down
4 changes: 2 additions & 2 deletions pir/hashing/multiple_choice_hash_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace distributed_point_functions {
absl::StatusOr<std::unique_ptr<MultipleChoiceHashTable>>
MultipleChoiceHashTable::Create(std::vector<HashFunction> hash_functions,
int num_buckets,
absl::optional<int> max_bucket_size) {
std::optional<int> max_bucket_size) {
if (num_buckets <= 0) {
return absl::InvalidArgumentError("num_buckets must be positive");
}
Expand All @@ -48,7 +48,7 @@ MultipleChoiceHashTable::Create(std::vector<HashFunction> hash_functions,

MultipleChoiceHashTable::MultipleChoiceHashTable(
std::vector<HashFunction> hash_functions, int num_buckets,
absl::optional<int> max_bucket_size)
std::optional<int> max_bucket_size)
: num_buckets_(num_buckets),
max_bucket_size_(max_bucket_size),
hash_functions_(std::move(hash_functions)),
Expand Down
4 changes: 2 additions & 2 deletions pir/hashing/simple_hash_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace distributed_point_functions {

absl::StatusOr<std::unique_ptr<SimpleHashTable>> SimpleHashTable::Create(
std::vector<HashFunction> hash_functions, int num_buckets,
absl::optional<int> max_bucket_size) {
std::optional<int> max_bucket_size) {
if (num_buckets <= 0) {
return absl::InvalidArgumentError("num_buckets must be positive");
}
Expand All @@ -46,7 +46,7 @@ absl::StatusOr<std::unique_ptr<SimpleHashTable>> SimpleHashTable::Create(

SimpleHashTable::SimpleHashTable(std::vector<HashFunction> hash_functions,
int num_buckets,
absl::optional<int> max_bucket_size)
std::optional<int> max_bucket_size)
: num_buckets_(num_buckets),
max_bucket_size_(max_bucket_size),
hash_functions_(std::move(hash_functions)),
Expand Down
Loading