diff options
| author | 2020-09-22 16:38:43 -0400 | |
|---|---|---|
| committer | 2020-09-22 16:38:45 -0400 | |
| commit | a881efbf261f901ceac20286e46c6251c473bc17 (patch) | |
| tree | 9f906d43d51ec8421e7294b31380fddbb8ddc060 | |
| parent | Merge pull request #4675 from Morph1984/fix-boot-multicontent (diff) | |
| download | yuzu-a881efbf261f901ceac20286e46c6251c473bc17.tar.gz yuzu-a881efbf261f901ceac20286e46c6251c473bc17.tar.xz yuzu-a881efbf261f901ceac20286e46c6251c473bc17.zip | |
ips_layer: Eliminate a redundant copy in Parse()
Prevents unnecessary copying of the line being parsed.
Diffstat (limited to '')
| -rw-r--r-- | src/core/file_sys/ips_layer.cpp | 6 |
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 a08a70efd..dd779310f 100644 --- a/src/core/file_sys/ips_layer.cpp +++ b/src/core/file_sys/ips_layer.cpp | |||
| @@ -245,9 +245,11 @@ void IPSwitchCompiler::Parse() { | |||
| 245 | 245 | ||
| 246 | // Read rest of patch | 246 | // Read rest of patch |
| 247 | while (true) { | 247 | while (true) { |
| 248 | if (i + 1 >= lines.size()) | 248 | if (i + 1 >= lines.size()) { |
| 249 | break; | 249 | break; |
| 250 | const auto patch_line = lines[++i]; | 250 | } |
| 251 | |||
| 252 | const auto& patch_line = lines[++i]; | ||
| 251 | 253 | ||
| 252 | // Start of new patch | 254 | // Start of new patch |
| 253 | if (StartsWith(patch_line, "@enabled") || StartsWith(patch_line, "@disabled")) { | 255 | if (StartsWith(patch_line, "@enabled") || StartsWith(patch_line, "@disabled")) { |