filamat: Resolve string processing inefficiency (#2754)

Co-authored-by: Michael Lou <ylou@amazon.com>
This commit is contained in:
Michael Lou
2020-06-30 10:39:31 -07:00
committed by GitHub
co-authored by Michael Lou
parent a6872c840c
commit 820f551eea
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ void LineDictionary::addText(const std::string& line) noexcept {
cur++;
len++;
}
std::string newLine(s, pos, len);
std::string newLine(s + pos, len);
addLine(std::move(newLine));
cur++;
}
+1 -1
View File
@@ -46,7 +46,7 @@ void compressShader(const char *s, Flattener &f, const LineDictionary& dictionar
len++;
}
std::string newLine(s, pos, len);
std::string newLine(s + pos, len);
size_t index = dictionary.getIndex(newLine);
if (index > UINT16_MAX) {