Lines Matching refs:op2
37 bool AddInt(T op1, T op2, T minVal, T maxVal, T &res) in AddInt() argument
40 if (op2 > maxVal - op1) { in AddInt()
44 if (op2 < minVal - op1) { in AddInt()
48 res = op1 + op2; in AddInt()
52 inline bool AddInt32(int32_t op1, int32_t op2, int32_t &res) in AddInt32() argument
54 …return AddInt(op1, op2, std::numeric_limits<int32_t>::min(), std::numeric_limits<int32_t>::max(), … in AddInt32()
57 inline bool AddInt64(int64_t op1, int64_t op2, int64_t &res) in AddInt64() argument
59 …return AddInt(op1, op2, std::numeric_limits<int64_t>::min(), std::numeric_limits<int64_t>::max(), … in AddInt64()
63 bool MultiplyInt(T op1, T op2, T minVal, T maxVal, T &res) in MultiplyInt() argument
66 if (op2 > 0) { in MultiplyInt()
67 if (op1 > maxVal / op2) { in MultiplyInt()
71 if (op2 < minVal / op1) { in MultiplyInt()
76 if (op2 > 0) { in MultiplyInt()
77 if (op1 < minVal / op2) { in MultiplyInt()
81 if (op1 != 0 && op2 < maxVal / op1) { in MultiplyInt()
86 res = op1 * op2; in MultiplyInt()
90 inline bool MultiplyInt32(int32_t op1, int32_t op2, int32_t& res) in MultiplyInt32() argument
92 …return MultiplyInt(op1, op2, std::numeric_limits<int32_t>::min(), std::numeric_limits<int32_t>::ma… in MultiplyInt32()
95 inline bool MultiplyInt64(int64_t op1, int64_t op2, int64_t& res) in MultiplyInt64() argument
97 …return MultiplyInt(op1, op2, std::numeric_limits<int64_t>::min(), std::numeric_limits<int64_t>::ma… in MultiplyInt64()