X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/554a2f77f485f55c8c62ae9d854a2198b2c0f98f..02c7f0f453d4237a6cf6bec885863a32addb6d75:/stglibs/common.lib/include/stg/common.h diff --git a/stglibs/common.lib/include/stg/common.h b/stglibs/common.lib/include/stg/common.h index ddc69def..14ba7220 100644 --- a/stglibs/common.lib/include/stg/common.h +++ b/stglibs/common.lib/include/stg/common.h @@ -31,6 +31,7 @@ #include #else #include +#include // NAME_MAX #endif #include #include @@ -152,6 +153,7 @@ std::string ToPrintable(const std::string & src); //----------------------------------------------------------------------------- int str2x(const std::string & str, int32_t & x); int str2x(const std::string & str, uint32_t & x); +int str2x(const std::string & str, double & x); #ifndef WIN32 int str2x(const std::string & str, int64_t & x); int str2x(const std::string & str, uint64_t & x); @@ -168,11 +170,11 @@ int str2x(const std::string & str, varT & x); template const std::string & x2str(varT x, std::string & s); template -const std::string & x2str(varT x) { std::string s; return x2str(x, s); } +std::string x2str(varT x) { std::string s; return x2str(x, s); } template const std::string & unsigned2str(varT x, std::string & s); template -const std::string & unsigned2str(varT x) { std::string s; return unsigned2str(x, s); } +std::string unsigned2str(varT x) { std::string s; return unsigned2str(x, s); } //----------------------------------------------------------------------------- template