From 8b0c866f025f3b48db36b0e48451062806a1ab06 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Mon, 26 Jun 2017 12:49:05 +0100 Subject: Add hasHexPrefix() to AST::Literal --- libsolidity/analysis/TypeChecker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libsolidity/analysis') diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index b276a2d4..436d960b 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -1886,7 +1886,7 @@ void TypeChecker::expectType(Expression const& _expression, Type const& _expecte { auto literal = dynamic_cast(&_expression); - if (literal && !boost::starts_with(literal->value(), "0x")) + if (literal && !literal->hasHexPrefix()) m_errorReporter.warning( _expression.location(), "Decimal literal assigned to bytesXX variable will be left-aligned. " -- cgit