MCPcopy Create free account
hub / github.com/apache/arrow / SafeSignedAdd

Function SafeSignedAdd

cpp/src/arrow/json/from_string_test.cc:69–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67// Avoid undefined behaviour on signed overflow
68template <typename Signed>
69Signed SafeSignedAdd(Signed u, Signed v) {
70 using Unsigned = typename std::make_unsigned<Signed>::type;
71 return static_cast<Signed>(static_cast<Unsigned>(u) + static_cast<Unsigned>(v));
72}
73
74// Special case for 8-bit ints (must output their decimal value, not the
75// corresponding ASCII character)

Callers 6

PutOffsetsFunction · 0.50
PutListViewOffsetsFunction · 0.50
ConcatenateImplMethod · 0.50
VisitMethod · 0.50
CallMethod · 0.50
CallMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected