X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fstrings%2Flexicalcast.cpp;h=6a226e1d27ac5ff356589c4e59f06c65085ebde4;hb=c29459b08eca95418fbdee714a1c59f3becdb2ce;hp=782f4a8537adb05583c6e45e68c6b80620439142;hpb=c7afef88380ebebc8c2b04e48664d73281ec8848;p=libs%2Fcore.git diff --git a/source/strings/lexicalcast.cpp b/source/strings/lexicalcast.cpp index 782f4a8..6a226e1 100644 --- a/source/strings/lexicalcast.cpp +++ b/source/strings/lexicalcast.cpp @@ -1,5 +1,6 @@ #include #include +#include #include "format.h" #include "lexicalcast.h" @@ -13,20 +14,6 @@ template struct IsSigned { enum { result = !(static_cast(-1)>0) }; }; -templatesizeof(unsigned long))> -struct Temporary -{ typedef unsigned long Type; }; - -template -struct Temporary -{ -#ifdef WIN32 - typedef __int64 Type; -#else - typedef unsigned long long Type; -#endif -}; - /* Helper to avoid warnings about an unsigned type never being < 0 */ template::result> struct IsNegative @@ -72,7 +59,7 @@ char *int_to_str(T v, const Fmt &f, char *end) const char *digits = (f.get_uppercase() ? udigits : ldigits); if(v) { - typename Temporary::Type w = Absolute::eval(v); + typename MatchingInt::UnsignedType w = Absolute::eval(v); while(w) { *--ptr = digits[w%base]; @@ -547,7 +534,7 @@ void operator<<(LexicalConverter &c, const char *s) { c.result(str_to_str(s, c.get_fmt())); } void operator<<(LexicalConverter &c, const void *p) -{ c.result(int_to_str(reinterpret_cast(p), c.get_fmt())); } +{ c.result(int_to_str(reinterpret_cast(p), c.get_fmt())); } /*** operator>> ***/