summaryrefslogtreecommitdiff
path: root/Source/Core/UpdaterCommon/UpdaterCommon.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-05-28 17:45:36 -0400
committerLioncash <mathew1800@gmail.com>2019-05-29 07:06:53 -0400
commiteb475025b85686f4793bb83bac377033c17fbd2d (patch)
tree3a5c8e36cab1dae1e4e36ef243d44f540f2c55f1 /Source/Core/UpdaterCommon/UpdaterCommon.cpp
parent992c8bfc4e2394ad5786f5116f5e62ae595b5c44 (diff)
Common/FileUtil: Make WriteStringToFile consistent with ReadFileToString
Makes the parameter ordering consistent and less error-prone.
Diffstat (limited to 'Source/Core/UpdaterCommon/UpdaterCommon.cpp')
-rw-r--r--Source/Core/UpdaterCommon/UpdaterCommon.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/UpdaterCommon/UpdaterCommon.cpp b/Source/Core/UpdaterCommon/UpdaterCommon.cpp
index 77fb317040..9ec2c79edb 100644
--- a/Source/Core/UpdaterCommon/UpdaterCommon.cpp
+++ b/Source/Core/UpdaterCommon/UpdaterCommon.cpp
@@ -255,7 +255,7 @@ bool DownloadContent(const std::vector<TodoList::DownloadOp>& to_download,
std::optional<std::string> maybe_decompressed = GzipInflate(contents);
if (!maybe_decompressed)
return false;
- std::string decompressed = std::move(*maybe_decompressed);
+ const std::string decompressed = std::move(*maybe_decompressed);
// Check that the downloaded contents have the right hash.
Manifest::Hash contents_hash = ComputeHash(decompressed);
@@ -265,8 +265,8 @@ bool DownloadContent(const std::vector<TodoList::DownloadOp>& to_download,
return false;
}
- std::string out = temp_path + DIR_SEP + hash_filename;
- if (!File::WriteStringToFile(decompressed, out))
+ const std::string out = temp_path + DIR_SEP + hash_filename;
+ if (!File::WriteStringToFile(out, decompressed))
{
fprintf(log_fp, "Could not write cache file %s.\n", out.c_str());
return false;