From 35a08a4ce8f5bebefb210abc3856cce93edef576 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Mon, 3 May 2021 13:51:20 -0400 Subject: [PATCH] [nostalgia/tools/pack] Cleanup --- src/nostalgia/tools/pack.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/nostalgia/tools/pack.cpp b/src/nostalgia/tools/pack.cpp index eb7c9205..46b979cb 100644 --- a/src/nostalgia/tools/pack.cpp +++ b/src/nostalgia/tools/pack.cpp @@ -7,13 +7,13 @@ */ #include + #include #include -#include #include "pack/pack.hpp" -static ox::Error writeFileBuff(const ox::String &path, ox::Vector &buff) noexcept { +static ox::Error writeFileBuff(const ox::String &path, const ox::Vector &buff) noexcept { try { std::ofstream f(path.c_str(), std::ios::binary); f.write(buff.data(), static_cast(buff.size())); @@ -24,8 +24,9 @@ static ox::Error writeFileBuff(const ox::String &path, ox::Vector &buff) n } static ox::Error run(const ox::ClArgs &args) noexcept { - auto argSrc = args.getString("src", ""); - auto argDst = args.getString("dst", ""); + ox::trace::init(); + const auto argSrc = args.getString("src", ""); + const auto argDst = args.getString("dst", ""); if (argSrc == "") { oxErr("\033[31;1;1merror:\033[0m must specify a source directory\n"); return OxError(1, "must specify a source directory"); @@ -50,7 +51,6 @@ static ox::Error run(const ox::ClArgs &args) noexcept { } int main(int argc, const char **args) { - ox::trace::init(); auto err = run(ox::ClArgs(argc, args)); oxAssert(err, "pack failed"); return static_cast(err);