Common/MsgHandler: Namespace code within the Common namespace

Closes another gap in the Common library where code isn't being
namespaced under it.
This commit is contained in:
Lioncash
2019-06-16 23:45:37 -04:00
parent e7dd46a531
commit 4f1f55093f
15 changed files with 214 additions and 143 deletions

View File

@ -200,7 +200,7 @@ bool CompressFileToBlob(const std::string& infile_path, const std::string& outfi
if (deflateInit(&z, 9) != Z_OK)
return false;
callback(GetStringT("Files opened, ready to compress."), 0, arg);
callback(Common::GetStringT("Files opened, ready to compress."), 0, arg);
CompressedBlobHeader header;
header.magic_cookie = GCZ_MAGIC;
@ -239,8 +239,8 @@ bool CompressFileToBlob(const std::string& infile_path, const std::string& outfi
if (inpos != 0)
ratio = (int)(100 * position / inpos);
std::string temp =
StringFromFormat(GetStringT("%i of %i blocks. Compression ratio %i%%").c_str(), i,
const std::string temp =
StringFromFormat(Common::GetStringT("%i of %i blocks. Compression ratio %i%%").c_str(), i,
header.num_blocks, ratio);
bool was_cancelled = !callback(temp, (float)i / (float)header.num_blocks, arg);
if (was_cancelled)
@ -332,7 +332,7 @@ bool CompressFileToBlob(const std::string& infile_path, const std::string& outfi
if (success)
{
callback(GetStringT("Done compressing disc image."), 1.0f, arg);
callback(Common::GetStringT("Done compressing disc image."), 1.0f, arg);
}
return success;
}
@ -381,7 +381,8 @@ bool DecompressBlobToFile(const std::string& infile_path, const std::string& out
{
if (i % progress_monitor == 0)
{
bool was_cancelled = !callback(GetStringT("Unpacking"), (float)i / (float)num_buffers, arg);
const bool was_cancelled =
!callback(Common::GetStringT("Unpacking"), (float)i / (float)num_buffers, arg);
if (was_cancelled)
{
success = false;