Improved code based on CppCheck results
None of this should change the engine's behavior, but the code is better this way. Former-commit-id: 0127769848fc1f7fc8006ee607985cfc0ead2965
This commit is contained in:
@@ -249,7 +249,7 @@ NzString NzShader::GetSourceCode(nzShaderStage stage) const
|
||||
totalLength += length - 1;
|
||||
}
|
||||
|
||||
totalLength += (m_attachedShaders[stage].size()-1)*(sizeof(sep)/sizeof(char));
|
||||
totalLength += (m_attachedShaders[stage].size()-1) * (sizeof(sep)/sizeof(char));
|
||||
|
||||
NzString source(totalLength, '\0');
|
||||
|
||||
@@ -258,7 +258,7 @@ NzString NzShader::GetSourceCode(nzShaderStage stage) const
|
||||
{
|
||||
if (offset > 0)
|
||||
{
|
||||
std::memcpy(&source[offset], sep, sizeof(sep)/sizeof(char));
|
||||
std::memcpy(&source[offset], sep, sizeof(sep));
|
||||
offset += sizeof(sep)/sizeof(char);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user