diff options
author | Lioncash <mathew1800@gmail.com> | 2021-12-13 11:19:24 -0500 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2021-12-13 11:45:18 -0500 |
commit | ddda6ae776e0fab22a3cf70a9f4f5a87df86fda8 (patch) | |
tree | 6e24c10dedaa69e521d3945f8f6192047bad94a6 /src/input_common/drivers/tas_input.cpp | |
parent | db9320e7541430dc487e85f40912725bd5b66c8a (diff) |
tas_input: Execute clear() even if empty
clear() when empty is simply a no-op, so we can get rid of the check
here and let the stdlib do it for us.
Diffstat (limited to 'src/input_common/drivers/tas_input.cpp')
-rw-r--r-- | src/input_common/drivers/tas_input.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/input_common/drivers/tas_input.cpp b/src/input_common/drivers/tas_input.cpp index d14a43b9e0..bd4e411c9e 100644 --- a/src/input_common/drivers/tas_input.cpp +++ b/src/input_common/drivers/tas_input.cpp @@ -78,9 +78,8 @@ void Tas::LoadTasFiles() { } void Tas::LoadTasFile(size_t player_index, size_t file_index) { - if (!commands[player_index].empty()) { - commands[player_index].clear(); - } + commands[player_index].clear(); + std::string file = Common::FS::ReadStringFromFile( Common::FS::GetYuzuPath(Common::FS::YuzuPath::TASDir) / fmt::format("script{}-{}.txt", file_index, player_index + 1), |