Build fix: Make string assignment simpler to avoid some compiler issues.

Included changing related parameters to const.
Should fix complaints with previous commit. See issue #879.
This commit is contained in:
John Kessenich 2017-05-09 23:30:56 -06:00
Родитель 1ee1c8e1ed
Коммит 12d693682f
2 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -3851,8 +3851,8 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
// samplerBuffer and textureBuffer types.
sampler.setTexture(sampler.type, sampler.dim, sampler.arrayed, sampler.shadow,
sampler.ms);
typeName = sampler.getString();
addSamplingFunctions(sampler, typeName, version, profile);
TString textureTypeName = sampler.getString();
addSamplingFunctions(sampler, textureTypeName, version, profile);
}
}
}
@ -3877,7 +3877,7 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c
//
// Add all the query functions for the given type.
//
void TBuiltIns::addQueryFunctions(TSampler sampler, TString& typeName, int version, EProfile profile)
void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile)
{
if (sampler.image && ((profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 430)))
return;
@ -3954,7 +3954,7 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, TString& typeName, int versi
//
// Add all the image access functions for the given type.
//
void TBuiltIns::addImageFunctions(TSampler sampler, TString& typeName, int version, EProfile profile)
void TBuiltIns::addImageFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile)
{
int dims = dimMap[sampler.dim];
// most things with an array add a dimension, except for cubemaps
@ -4047,7 +4047,7 @@ void TBuiltIns::addImageFunctions(TSampler sampler, TString& typeName, int versi
//
// Add all the subpass access functions for the given type.
//
void TBuiltIns::addSubpassSampling(TSampler sampler, TString& typeName, int /*version*/, EProfile /*profile*/)
void TBuiltIns::addSubpassSampling(TSampler sampler, const TString& typeName, int /*version*/, EProfile /*profile*/)
{
stageBuiltins[EShLangFragment].append(prefixes[sampler.type]);
stageBuiltins[EShLangFragment].append("vec4 subpassLoad");
@ -4064,7 +4064,7 @@ void TBuiltIns::addSubpassSampling(TSampler sampler, TString& typeName, int /*ve
//
// Add all the texture lookup functions for the given type.
//
void TBuiltIns::addSamplingFunctions(TSampler sampler, TString& typeName, int version, EProfile profile)
void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile)
{
//
// texturing
@ -4294,7 +4294,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, TString& typeName, int ve
//
// Add all the texture gather functions for the given type.
//
void TBuiltIns::addGatherFunctions(TSampler sampler, TString& typeName, int version, EProfile profile)
void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile)
{
switch (sampler.dim) {
case Esd2D:

Просмотреть файл

@ -94,11 +94,11 @@ public:
protected:
void add2ndGenerationSamplingImaging(int version, EProfile profile, const SpvVersion& spvVersion);
void addSubpassSampling(TSampler, TString& typeName, int version, EProfile profile);
void addQueryFunctions(TSampler, TString& typeName, int version, EProfile profile);
void addImageFunctions(TSampler, TString& typeName, int version, EProfile profile);
void addSamplingFunctions(TSampler, TString& typeName, int version, EProfile profile);
void addGatherFunctions(TSampler, TString& typeName, int version, EProfile profile);
void addSubpassSampling(TSampler, const TString& typeName, int version, EProfile profile);
void addQueryFunctions(TSampler, const TString& typeName, int version, EProfile profile);
void addImageFunctions(TSampler, const TString& typeName, int version, EProfile profile);
void addSamplingFunctions(TSampler, const TString& typeName, int version, EProfile profile);
void addGatherFunctions(TSampler, const TString& typeName, int version, EProfile profile);
// Helpers for making textual representations of the permutations
// of texturing/imaging functions.