MCPcopy Create free account
hub / github.com/apache/impala / AddWithOverflowCheck

Function AddWithOverflowCheck

be/src/kudu/util/safe_math.h:62–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60// Add 'a' and 'b', and set *overflowed to true if overflow occured.
61template<typename Type>
62inline Type AddWithOverflowCheck(Type a, Type b, bool *overflowed) {
63 // Pick the right specialization based on whether Type is signed.
64 typedef safe_math_internal::WithOverflowCheck<Type, MathLimits<Type>::kIsSigned> my_struct;
65 return my_struct::Add(a, b, overflowed);
66}
67
68} // namespace kudu
69#endif

Callers 1

DoTestFunction · 0.85

Calls 1

AddFunction · 0.85

Tested by 1

DoTestFunction · 0.68