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

Function CheckedInt64ToInt32

internal/overflow.cc:321–325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321absl::StatusOr<int32_t> CheckedInt64ToInt32(int64_t v) {
322 CEL_RETURN_IF_ERROR(
323 CheckRange(v >= kInt32Min && v <= kInt32Max, "int64 out of int32 range"));
324 return static_cast<int32_t>(v);
325}
326
327absl::StatusOr<int64_t> CheckedUint64ToInt64(uint64_t v) {
328 CEL_RETURN_IF_ERROR(

Callers 4

Int32FromValueFunction · 0.85
AssignInt32Method · 0.85
AssignEnumMethod · 0.85
overflow_test.ccFile · 0.85

Calls 1

CheckRangeFunction · 0.85

Tested by

no test coverage detected