X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/46b0747592074017ff0ea4b33d4a7194235886e5..e5499c61083684b28bcbc6950aae66cbf0938703:/libs/common/common.cpp?ds=sidebyside diff --git a/libs/common/common.cpp b/libs/common/common.cpp index 8cfcf402..954fc381 100644 --- a/libs/common/common.cpp +++ b/libs/common/common.cpp @@ -824,24 +824,6 @@ return 0; } #endif //--------------------------------------------------------------------------- -const std::string & x2str(uint32_t x, std::string & s) -{ -return unsigned2str(x, s); -} -//--------------------------------------------------------------------------- -const std::string & x2str(uint64_t x, std::string & s) -{ -return unsigned2str(x, s); -} -//--------------------------------------------------------------------------- -const std::string & x2str(double x, std::string & s) -{ -char buf[256]; -snprintf(buf, sizeof(buf), "%f", x); -s = buf; -return s; -} -//--------------------------------------------------------------------------- std::string & TrimL(std::string & val) { size_t pos = val.find_first_not_of(" \t"); @@ -1125,7 +1107,7 @@ std::string ToPrintable(const std::string & src) if (std::isprint(src[i])) dest += src[i]; else - dest += "\\" + x2str(src[i]); + dest += "\\" + std::to_string(src[i]); return dest; }