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

Method AssignInt32

eval/public/structs/field_access_impl.cc:356–368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354 }
355
356 bool AssignInt32(const CelValue& cel_value) const {
357 int64_t value;
358 if (!cel_value.GetValue(&value)) {
359 return false;
360 }
361 absl::StatusOr<int32_t> checked_cast =
362 cel::internal::CheckedInt64ToInt32(value);
363 if (!checked_cast.ok()) {
364 return false;
365 }
366 static_cast<const Derived*>(this)->SetInt32(*checked_cast);
367 return true;
368 }
369
370 bool AssignUInt32(const CelValue& cel_value) const {
371 uint64_t value;

Callers

nothing calls this directly

Calls 4

CheckedInt64ToInt32Function · 0.85
GetValueMethod · 0.45
okMethod · 0.45
SetInt32Method · 0.45

Tested by

no test coverage detected