]> git.tdb.fi Git - libs/gltk.git/commitdiff
Fix compilation on 64-bit systems
authorMikko Rasa <tdb@tdb.fi>
Fri, 4 Dec 2009 07:36:45 +0000 (07:36 +0000)
committerMikko Rasa <tdb@tdb.fi>
Fri, 4 Dec 2009 07:36:45 +0000 (07:36 +0000)
source/logic.cpp
source/state.cpp
source/text.cpp

index ae9347019ad14d40ab228a4748f8ce94d67689ab..16444892a591b752aa7eff5e95b0f1bf67bfc07e 100644 (file)
@@ -25,7 +25,7 @@ void Logic::Loader::bind(const string &wdg, const string &data)
        if(i==widgets.end())
                throw KeyError("Unknown widget", wdg);
 
-       unsigned colon=data.find(':');
+       string::size_type colon=data.find(':');
        WidgetBinding act;
        act.wdg=i->second;
        act.type=data.substr(0, colon);
index 4e0a1debafadbbd711f03de028252cf20f2ff3c7..6eaf33613591fc5a0786e55fea9f16fdc0e6367c 100644 (file)
@@ -22,7 +22,7 @@ istream &operator>>(istream &is, State &state)
 
        while(1)
        {
-               unsigned underscore=str.find('_', start);
+               string::size_type underscore=str.find('_', start);
                if(!str.compare(start, underscore-start, "NORMAL"))
                        state|=NORMAL;
                else if(!str.compare(start, underscore-start, "HOVER"))
index 5f4095e135b33f65dfcb0fca73b171d19645c761..e4ec3290ac91ee551931d6444e27f4aeb86d64ef 100644 (file)
@@ -40,10 +40,10 @@ void Text::set(const string &t)
        text=t;
        lines.clear();
        float font_size=style->get_font()->get_default_size();
-       unsigned start=0;
+       string::size_type start=0;
        while(1)
        {
-               unsigned newline=text.find('\n', start);
+               string::size_type newline=text.find('\n', start);
 
                Line line;
                line.start=start;