Merge pull request #548 from baldurk/vs2010-compile-fixes

VS2010 compile fixes
This commit is contained in:
John Kessenich 2016-10-15 23:09:31 -06:00 committed by GitHub
commit 1fabc0f697
9 changed files with 170 additions and 164 deletions

View file

@ -361,7 +361,7 @@ const TFunction* TParseContextBase::selectFunction(
return viableCandidates.front();
// 4. find best...
auto betterParam = [&call, &better](const TFunction& can1, const TFunction& can2){
auto betterParam = [&call, &better](const TFunction& can1, const TFunction& can2) -> bool {
// is call -> can2 better than call -> can1 for any parameter
bool hasBetterParam = false;
for (int param = 0; param < call.getParamCount(); ++param) {

View file

@ -4873,7 +4873,7 @@ const TFunction* TParseContext::findFunction400(const TSourceLoc& loc, const TFu
symbolTable.findFunctionNameList(call.getMangledName(), candidateList, builtIn);
// can 'from' convert to 'to'?
const auto convertible = [this](const TType& from, const TType& to) {
const auto convertible = [this](const TType& from, const TType& to) -> bool {
if (from == to)
return true;
if (from.isArray() || to.isArray() || ! from.sameElementShape(to))
@ -4884,7 +4884,7 @@ const TFunction* TParseContext::findFunction400(const TSourceLoc& loc, const TFu
// Is 'to2' a better conversion than 'to1'?
// Ties should not be considered as better.
// Assumes 'convertible' already said true.
const auto better = [](const TType& from, const TType& to1, const TType& to2) {
const auto better = [](const TType& from, const TType& to1, const TType& to2) -> bool {
// 1. exact match
if (from == to2)
return from != to1;