mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-14 22:01:04 +00:00
Merge pull request #210 from AWoloszyn/fix-compilation
Fixed compilation issue introduced by my last commit
This commit is contained in:
commit
5ace09a75b
@ -170,6 +170,14 @@ public:
|
|||||||
loc[getLastValidSourceIndex()].name = filename;
|
loc[getLastValidSourceIndex()].name = filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setFile(const char* filename, size_t i)
|
||||||
|
{
|
||||||
|
if (i == getLastValidSourceIndex()) {
|
||||||
|
logicalSourceLoc.name = filename;
|
||||||
|
}
|
||||||
|
loc[i].name = filename;
|
||||||
|
}
|
||||||
|
|
||||||
void setString(int newString)
|
void setString(int newString)
|
||||||
{
|
{
|
||||||
logicalSourceLoc.string = newString;
|
logicalSourceLoc.string = newString;
|
||||||
|
@ -447,19 +447,24 @@ protected:
|
|||||||
prologue_(prologue),
|
prologue_(prologue),
|
||||||
includedFile_(includedFile),
|
includedFile_(includedFile),
|
||||||
epilogue_(epilogue),
|
epilogue_(epilogue),
|
||||||
strings({prologue_.data(), includedFile_->file_data, epilogue_.data()}),
|
|
||||||
lengths({prologue_.size(), includedFile_->file_length, epilogue_.size()}),
|
|
||||||
names({
|
|
||||||
includedFile_->file_name.c_str(),
|
|
||||||
includedFile_->file_name.c_str(),
|
|
||||||
includedFile_->file_name.c_str()
|
|
||||||
}),
|
|
||||||
scanner(3, strings, lengths, names, 0, 0, true),
|
scanner(3, strings, lengths, names, 0, 0, true),
|
||||||
prevScanner(nullptr),
|
prevScanner(nullptr),
|
||||||
stringInput(pp, scanner) {
|
stringInput(pp, scanner)
|
||||||
scanner.setLine(startLoc.line);
|
{
|
||||||
scanner.setString(startLoc.string);
|
strings[0] = prologue_.data();
|
||||||
scanner.setFile(startLoc.name);
|
strings[1] = includedFile_->file_data;
|
||||||
|
strings[2] = epilogue_.data();
|
||||||
|
|
||||||
|
lengths[0] = prologue_.size();
|
||||||
|
lengths[1] = includedFile_->file_length;
|
||||||
|
lengths[2] = epilogue_.size();
|
||||||
|
|
||||||
|
scanner.setLine(startLoc.line);
|
||||||
|
scanner.setString(startLoc.string);
|
||||||
|
|
||||||
|
scanner.setFile(startLoc.name, 0);
|
||||||
|
scanner.setFile(startLoc.name, 1);
|
||||||
|
scanner.setFile(startLoc.name, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// tInput methods:
|
// tInput methods:
|
||||||
|
Loading…
Reference in New Issue
Block a user