[poincare] Clean Macro in integer

Change-Id: I0e9ebe49921269b3812e9e7a1f496465e52738aa
This commit is contained in:
Émilie Feral
2017-09-25 15:04:44 +02:00
parent 0979a26685
commit c1a65654d7

View File

@@ -9,12 +9,9 @@ extern "C" {
#include "layout/string_layout.h"
#include <utility>
#define MAX(a,b) ((a)>(b)?a:b)
namespace Poincare {
// Helper functions
static inline int max(int x, int y) { return (x>y ? x : y); }
uint8_t log2(Integer::native_uint_t v) {
constexpr int nativeUnsignedIntegerBitCount = 8*sizeof(Integer::native_uint_t);
@@ -251,7 +248,7 @@ int8_t Integer::ucmp(const Integer & a, const Integer & b) {
}
Integer Integer::usum(const Integer & a, const Integer & b, bool subtract, bool outputNegative) {
uint16_t size = MAX(a.m_numberOfDigits, b.m_numberOfDigits);
uint16_t size = max(a.m_numberOfDigits, b.m_numberOfDigits);
if (!subtract) {
// Addition can overflow
size += 1;