From 797e05ba085d13d096bb4221fc0cec3a3161a876 Mon Sep 17 00:00:00 2001 From: Ryan Casey Date: Thu, 9 Mar 2017 17:03:19 -0800 Subject: Resolve build-stopping error about 'minor' and 'major' being defined in --- libsolidity/analysis/SemVerHandler.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libsolidity/analysis/SemVerHandler.h b/libsolidity/analysis/SemVerHandler.h index fae0a764..76b70c5b 100644 --- a/libsolidity/analysis/SemVerHandler.h +++ b/libsolidity/analysis/SemVerHandler.h @@ -34,6 +34,9 @@ class SemVerError: dev::Exception { }; +#undef major +#undef minor + struct SemVerVersion { unsigned numbers[3]; -- cgit v1.2.3 From fe8d09a3c117b6e521638450e5ff14dc0d658b70 Mon Sep 17 00:00:00 2001 From: Ryan Casey Date: Thu, 9 Mar 2017 17:04:26 -0800 Subject: Fix 'ambiguous overload for operator==' Boost error. --- libsolidity/ast/Types.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 7f267cc9..d2793b6d 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -650,12 +650,12 @@ bool RationalNumberType::isImplicitlyConvertibleTo(Type const& _convertTo) const if (_convertTo.category() == Category::Integer) { auto targetType = dynamic_cast(&_convertTo); - if (m_value == 0) + if (m_value == rational(0)) return true; if (isFractional()) return false; int forSignBit = (targetType->isSigned() ? 1 : 0); - if (m_value > 0) + if (m_value > rational(0)) { if (m_value.numerator() <= (u256(-1) >> (256 - targetType->numBits() + forSignBit))) return true; @@ -776,13 +776,13 @@ TypePointer RationalNumberType::binaryOperatorResult(Token::Value _operator, Typ value = m_value * other.m_value; break; case Token::Div: - if (other.m_value == 0) + if (other.m_value == rational(0)) return TypePointer(); else value = m_value / other.m_value; break; case Token::Mod: - if (other.m_value == 0) + if (other.m_value == rational(0)) return TypePointer(); else if (fractional) { @@ -887,7 +887,7 @@ u256 RationalNumberType::literalValue(Literal const*) const solAssert(shiftedValue <= u256(-1), "Integer constant too large."); solAssert(shiftedValue >= -(bigint(1) << 255), "Number constant too small."); - if (m_value >= 0) + if (m_value >= rational(0)) value = u256(shiftedValue); else value = s2u(s256(shiftedValue)); -- cgit v1.2.3