gl_shader_decompiler: Reserve element memory beforehand in BuildRegisterList()

Avoids potentially perfoming multiple reallocations when we know the
total amount of memory we need beforehand.
merge-requests/60/head
Lioncash 2018-08-09 17:29:09 +07:00
parent 0bfe974281
commit 6ef027b958
1 changed files with 2 additions and 0 deletions

@ -507,6 +507,8 @@ private:
/// Build the GLSL register list.
void BuildRegisterList() {
regs.reserve(Register::NumRegisters);
for (size_t index = 0; index < Register::NumRegisters; ++index) {
regs.emplace_back(index, suffix);
}