X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/46b0747592074017ff0ea4b33d4a7194235886e5..0c097ef3435d2a45c1ee4ac80f8bd3f254fb8df5:/libs/common/include/stg/common.h

diff --git a/libs/common/include/stg/common.h b/libs/common/include/stg/common.h
index 94cf9f06..ca8c3b45 100644
--- a/libs/common/include/stg/common.h
+++ b/libs/common/include/stg/common.h
@@ -171,22 +171,9 @@ int str2x(const std::string & str, int64_t & x);
 int str2x(const std::string & str, uint64_t & x);
 #endif
 //-----------------------------------------------------------------------------
-const std::string & x2str(uint32_t x, std::string & s);
-const std::string & x2str(uint64_t x, std::string & s);
-//-----------------------------------------------------------------------------
-const std::string & x2str(double x, std::string & s);
-//-----------------------------------------------------------------------------
 
 template <typename varT>
 int str2x(const std::string & str, varT & x);
-template <typename varT>
-const std::string & x2str(varT x, std::string & s);
-template <typename varT>
-std::string x2str(varT x) { std::string s; return x2str(x, s); }
-template <typename varT>
-const std::string & unsigned2str(varT x, std::string & s);
-template <typename varT>
-std::string unsigned2str(varT x) { std::string s; return unsigned2str(x, s); }
 
 //-----------------------------------------------------------------------------
 template <typename varT>
@@ -227,89 +214,6 @@ int str2x(const std::string & str, varT & x)
     return 0;
 }
 //-----------------------------------------------------------------------------
-template <typename varT>
-inline
-const std::string & x2str(varT x, std::string & s)
-{
-    varT xx = x;
-    int pos = 1;
-
-    x /= 10;
-    while (x != 0)
-    {
-        x /= 10;
-        pos++;
-    }
-
-    if (xx < 0)
-    {
-        pos++;
-        s.resize(pos, 0);
-        s[0] = '-';
-    }
-    else if (xx > 0)
-    {
-        s.resize(pos, 0);
-    }
-    else
-    {
-        s.resize(1, 0);
-        s[0] = '0';
-        return s;
-    }
-
-    x = xx;
-
-    while (x != 0)
-    {
-        if (x < 0)
-            s[--pos] = -(x % 10) + '0';
-        else
-            s[--pos] = x % 10 + '0';
-
-        x /= 10;
-    }
-
-    return s;
-}
-//-----------------------------------------------------------------------------
-template <typename varT>
-inline
-const std::string & unsigned2str(varT x, std::string & s)
-{
-    varT xx = x;
-    int pos = 1;
-
-    x /= 10;
-    while (x != 0)
-    {
-        x /= 10;
-        pos++;
-    }
-
-    if (xx > 0)
-    {
-        s.resize(pos, 0);
-    }
-    else
-    {
-        s.resize(1, 0);
-        s[0] = '0';
-        return s;
-    }
-
-    x = xx;
-
-    while (x != 0)
-    {
-        s[--pos] = x % 10 + '0';
-
-        x /= 10;
-    }
-
-    return s;
-}
-//-----------------------------------------------------------------------------
 char * stg_strptime(const char *, const char *, struct tm *);
 time_t stg_timegm(struct tm *);