Change function to take const ref instead of copying whole vector

This commit is contained in:
baldurk
2015-04-11 17:52:08 +01:00
parent a5cc19ccc6
commit 54b2ba86a3
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -96,14 +96,14 @@ void copy(rdctype::array<ShaderConstant> &outvars, const vector<DynShaderConstan
}
}
void CheckVertexOutputUses(vector<string> sources, bool &pointSizeUsed, bool &clipDistanceUsed)
void CheckVertexOutputUses(const vector<string> &sources, bool &pointSizeUsed, bool &clipDistanceUsed)
{
pointSizeUsed = false;
clipDistanceUsed = false;
for(size_t i=0; i < sources.size(); i++)
{
string &s = sources[i];
const string &s = sources[i];
size_t offs = 0;
+1 -1
View File
@@ -28,4 +28,4 @@
void MakeShaderReflection(const GLHookSet &gl, GLenum shadType, GLuint sepProg, ShaderReflection &refl, bool pointSizeUsed, bool clipDistanceUsed);
GLuint MakeSeparableShaderProgram(const GLHookSet &gl, GLenum type, std::vector<std::string> sources, vector<string> *includepaths);
void CheckVertexOutputUses(std::vector<std::string> sources, bool &pointSizeUsed, bool &clipDistanceUsed);
void CheckVertexOutputUses(const std::vector<std::string> &sources, bool &pointSizeUsed, bool &clipDistanceUsed);