aboutsummaryrefslogtreecommitdiff
path: root/src/core/file_sys/ips_layer.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-09-22 16:38:43 -0400
committerLioncash <mathew1800@gmail.com>2020-09-22 16:38:45 -0400
commit485eec243d3e1b8da338ac87397931489b59f423 (patch)
tree9f906d43d51ec8421e7294b31380fddbb8ddc060 /src/core/file_sys/ips_layer.cpp
parent292693b696bb50ce39abf256dbf4d8d5c8f60762 (diff)
ips_layer: Eliminate a redundant copy in Parse()
Prevents unnecessary copying of the line being parsed.
Diffstat (limited to 'src/core/file_sys/ips_layer.cpp')
-rw-r--r--src/core/file_sys/ips_layer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/file_sys/ips_layer.cpp b/src/core/file_sys/ips_layer.cpp
index a08a70efdf..dd779310f8 100644
--- a/src/core/file_sys/ips_layer.cpp
+++ b/src/core/file_sys/ips_layer.cpp
@@ -245,9 +245,11 @@ void IPSwitchCompiler::Parse() {
// Read rest of patch
while (true) {
- if (i + 1 >= lines.size())
+ if (i + 1 >= lines.size()) {
break;
- const auto patch_line = lines[++i];
+ }
+
+ const auto& patch_line = lines[++i];
// Start of new patch
if (StartsWith(patch_line, "@enabled") || StartsWith(patch_line, "@disabled")) {