From 8d65fd18fc2d8557521b68b7959331649c5db436 Mon Sep 17 00:00:00 2001 From: Leonardo Alt Date: Thu, 9 May 2019 13:17:00 +0200 Subject: [PATCH] [SMTChecker] Style changes --- libsolidity/formal/SMTChecker.cpp | 4 ++-- libsolidity/formal/SMTPortfolio.cpp | 4 ++-- libsolidity/formal/SymbolicTypes.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libsolidity/formal/SMTChecker.cpp b/libsolidity/formal/SMTChecker.cpp index b52d5d3ce..4888daf92 100644 --- a/libsolidity/formal/SMTChecker.cpp +++ b/libsolidity/formal/SMTChecker.cpp @@ -688,7 +688,7 @@ void SMTChecker::endVisit(FunctionCall const& _funCall) { auto const& memberAccess = dynamic_cast(_funCall.expression()); auto const& address = memberAccess.expression(); - auto const& value = args.at(0); + auto const& value = args.front(); solAssert(value, ""); smt::Expression thisBalance = m_context.balance(); @@ -861,7 +861,7 @@ void SMTChecker::visitTypeConversion(FunctionCall const& _funCall) { solAssert(_funCall.annotation().kind == FunctionCallKind::TypeConversion, ""); solAssert(_funCall.arguments().size() == 1, ""); - auto argument = _funCall.arguments().at(0); + auto argument = _funCall.arguments().front(); unsigned argSize = argument->annotation().type->storageBytes(); unsigned castSize = _funCall.annotation().type->storageBytes(); if (argSize == castSize) diff --git a/libsolidity/formal/SMTPortfolio.cpp b/libsolidity/formal/SMTPortfolio.cpp index 34255f905..688094c28 100644 --- a/libsolidity/formal/SMTPortfolio.cpp +++ b/libsolidity/formal/SMTPortfolio.cpp @@ -134,8 +134,8 @@ vector SMTPortfolio::unhandledQueries() // This code assumes that the constructor guarantees that // SmtLib2Interface is in position 0. solAssert(!m_solvers.empty(), ""); - solAssert(dynamic_cast(m_solvers.at(0).get()), ""); - return m_solvers.at(0)->unhandledQueries(); + solAssert(dynamic_cast(m_solvers.front().get()), ""); + return m_solvers.front()->unhandledQueries(); } bool SMTPortfolio::solverAnswered(CheckResult result) diff --git a/libsolidity/formal/SymbolicTypes.cpp b/libsolidity/formal/SymbolicTypes.cpp index 175637735..9c0763f69 100644 --- a/libsolidity/formal/SymbolicTypes.cpp +++ b/libsolidity/formal/SymbolicTypes.cpp @@ -47,7 +47,7 @@ smt::SortPointer dev::solidity::smtSort(Type const& _type) // Abstract sort. returnSort = make_shared(smt::Kind::Int); else - returnSort = smtSort(*returnTypes.at(0)); + returnSort = smtSort(*returnTypes.front()); return make_shared(parameterSorts, returnSort); } case smt::Kind::Array: