MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / ValueHash

Function ValueHash

common/values/value_builder.cc:645–660  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

643}
644
645size_t ValueHash(const Value& value) {
646 switch (value.kind()) {
647 case ValueKind::kBool:
648 return absl::HashOf(value.kind(), value.GetBool());
649 case ValueKind::kInt:
650 return absl::HashOf(ValueKind::kInt,
651 absl::implicit_cast<int64_t>(value.GetInt()));
652 case ValueKind::kUint:
653 return absl::HashOf(ValueKind::kUint,
654 absl::implicit_cast<uint64_t>(value.GetUint()));
655 case ValueKind::kString:
656 return absl::HashOf(value.kind(), value.GetString());
657 default:
658 ABSL_UNREACHABLE();
659 }
660}
661
662size_t ValueHash(const CelValue& value) {
663 switch (value.type()) {

Callers

nothing calls this directly

Calls 11

typeMethod · 0.80
BoolOrDieMethod · 0.80
Int64OrDieMethod · 0.80
Uint64OrDieMethod · 0.80
StringOrDieMethod · 0.80
kindMethod · 0.45
GetBoolMethod · 0.45
GetIntMethod · 0.45
GetUintMethod · 0.45
GetStringMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected