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
9 changed files with 170 additions and 164 deletions

View File

@@ -1330,7 +1330,7 @@ TIntermTyped* HlslParseContext::handleAssign(const TSourceLoc& loc, TOperator op
const auto getMember = [&](bool flatten, TIntermTyped* node,
const TVector<TVariable*>& memberVariables, int member,
TOperator op, const TType& memberType) {
TOperator op, const TType& memberType) -> TIntermTyped * {
TIntermTyped* subTree;
if (flatten)
subTree = intermediate.addSymbol(*memberVariables[member]);
@@ -3037,7 +3037,7 @@ void HlslParseContext::handleRegister(const TSourceLoc& loc, TQualifier& qualifi
// space
unsigned int setNumber;
const auto crackSpace = [&]() {
const auto crackSpace = [&]() -> bool {
const int spaceLen = 5;
if (spaceDesc->size() < spaceLen + 1)
return false;
@@ -4233,7 +4233,7 @@ const TFunction* HlslParseContext::findFunction(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;
@@ -4260,7 +4260,7 @@ const TFunction* HlslParseContext::findFunction(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 {
// exact match is always better than mismatch
if (from == to2)
return from != to1;
@@ -4287,7 +4287,7 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, const TFu
// - 32 vs. 64 bit (or width in general)
// - bool vs. non bool
// - signed vs. not signed
const auto linearize = [](const TBasicType& basicType) {
const auto linearize = [](const TBasicType& basicType) -> int {
switch (basicType) {
case EbtBool: return 1;
case EbtInt: return 10;