]> git.tdb.fi Git - libs/core.git/commitdiff
Fix compile erorrs on 64-bit systems
authorMikko Rasa <tdb@tdb.fi>
Sun, 20 Sep 2009 16:16:36 +0000 (16:16 +0000)
committerMikko Rasa <tdb@tdb.fi>
Sun, 20 Sep 2009 16:16:36 +0000 (16:16 +0000)
source/lexicalcast.cpp
source/utils.cpp

index 9ba642f2ae48bebe826c226ef98b8604e4c49114..a1270d6d6074d6b4e68d817fe940e1fd9b1da2e2 100644 (file)
@@ -119,7 +119,7 @@ char *int_to_str(T v, const Fmt &f, char *end)
 template<typename T>
 string int_to_str(T v, const Fmt &f)
 {
-       unsigned size=max(f.get_width(), max(f.get_precision(), sizeof(T)*8+3));
+       unsigned size=max(f.get_width(), max<unsigned>(f.get_precision(), sizeof(T)*8+3));
        char *buf=new char[size];
        string result(int_to_str(v, f, buf+size), buf+size);
        delete[] buf;
index c2bafb9b85527c9b570dea735588397900f4f6ca..675a2b1094b44f05d44b8cdb3e25cd732b2f72a0 100644 (file)
@@ -139,13 +139,13 @@ vector<string> split(const string &str, const string &sep, bool allow_empty)
 {
        vector<string> result;
        
-       unsigned start=0;
+       string::size_type start=0;
        if(!allow_empty)
                start=str.find_first_not_of(sep);
        
        while(start<str.size())
        {
-               unsigned end=str.find_first_of(sep, start);
+               string::size_type end=str.find_first_of(sep, start);
                result.push_back(str.substr(start, end-start));
                
                if(end==string::npos)