aboutsummaryrefslogtreecommitdiff
path: root/src/core/arm/arm_interface.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-05-14 12:12:57 -0400
committerLioncash <mathew1800@gmail.com>2019-05-19 14:12:20 -0400
commit98379b2ae1de366a9b29ad385dad541b5d0dd8a6 (patch)
tree526498f65800c81abe7d8525e396f7728437ce9f /src/core/arm/arm_interface.cpp
parent5127e54674bf059a698b900614edda6143515d27 (diff)
gl_shader_decompiler: Add AddLine() overload that forwards to fmt
In a lot of places throughout the decompiler, string concatenation via operator+ is used quite heavily. This is usually fine, when not heavily used, but when used extensively, can be a problem. operator+ creates an entirely new heap allocated temporary string and given we perform expressions like: std::string thing = a + b + c + d; this ends up with a lot of unnecessary temporary strings being created and discarded, which kind of thrashes the heap more than we need to. Given we utilize fmt in some AddLine calls, we can make this a part of the ShaderWriter's API. We can make an overload that simply acts as a passthrough to fmt. This way, whenever things need to be appended to a string, the operation can be done via a single string formatting operation instead of discarding numerous temporary strings. This also has the benefit of making the strings themselves look nicer and makes it easier to spot errors in them.
Diffstat (limited to 'src/core/arm/arm_interface.cpp')
0 files changed, 0 insertions, 0 deletions