Skip to content

Commit

Permalink
Migrate from std::unordered_set to absl::node_hash_set.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 357742000
  • Loading branch information
Googler authored and nickgeorge committed Feb 16, 2021
1 parent fa1526c commit bc3fe21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions cc/google/fhir/fhir_path/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ cc_library(
"//cc/google/fhir/status",
"//cc/google/fhir/status:statusor",
"//proto/google/fhir/proto/r4/core:datatypes_cc_proto",
"@com_google_absl//absl/container:node_hash_set",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/status",
"@com_google_absl//absl/status:statusor",
Expand Down
4 changes: 3 additions & 1 deletion cc/google/fhir/fhir_path/fhir_path.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "google/protobuf/any.pb.h"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/util/message_differencer.h"
#include "absl/container/node_hash_set.h"
#include "absl/memory/memory.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
Expand Down Expand Up @@ -1809,7 +1810,8 @@ class IsDistinctFunction : public ZeroParameterFunctionNode {
std::vector<WorkspaceMessage> child_results;
FHIR_RETURN_IF_ERROR(child_->Evaluate(work_space, &child_results));

std::unordered_set<WorkspaceMessage, ProtoPtrHash, ProtoPtrSameTypeAndEqual>
absl::node_hash_set<WorkspaceMessage, ProtoPtrHash,
ProtoPtrSameTypeAndEqual>
child_results_set(
child_results.begin(), child_results.end(), kDefaultSetBucketCount,
ProtoPtrHash(work_space->GetPrimitiveHandler()),
Expand Down

0 comments on commit bc3fe21

Please sign in to comment.