Fix compilation issues with MSVC 2010

(mostly by eliminating use of range-based for loops and std::tie)
This commit is contained in:
rdb 2016-02-23 22:17:38 +01:00
parent 0967748fbc
commit 32084e889d
8 changed files with 28 additions and 28 deletions

View file

@ -206,7 +206,7 @@ struct TSourceLoc {
{
if (name != nullptr)
return quoteStringName ? ("\"" + std::string(name) + "\"") : name;
return std::to_string(string);
return std::to_string((long long)string);
}
const char* name; // descriptive name for this string
int string;

View file

@ -757,13 +757,9 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree)
case EShLangCompute:
infoSink.debug << "local_size = (" << localSize[0] << ", " << localSize[1] << ", " << localSize[2] << ")\n";
{
bool dumpSpecIds = false;
for (auto c : localSizeSpecId) {
if (c != TQualifier::layoutNotSet)
dumpSpecIds = true;
}
if (dumpSpecIds) {
if (localSizeSpecId[0] != TQualifier::layoutNotSet ||
localSizeSpecId[1] != TQualifier::layoutNotSet ||
localSizeSpecId[2] != TQualifier::layoutNotSet) {
infoSink.debug << "local_size ids = (" <<
localSizeSpecId[0] << ", " <<
localSizeSpecId[1] << ", " <<

View file

@ -611,9 +611,9 @@ int TPpContext::CPPinclude(TPpToken* ppToken)
if (token != '\n' && token != EndOfInput) {
parseContext.ppError(ppToken->loc, "extra content after file designation", "#include", "");
} else {
std::string sourceName;
std::string replacement;
std::tie(sourceName, replacement) = includer.include(filename.c_str());
auto include = includer.include(filename.c_str());
std::string sourceName = include.first;
std::string replacement = include.second;
if (!sourceName.empty()) {
if (!replacement.empty()) {
const bool forNextLine = parseContext.lineDirectiveShouldSetNextLine();