From: Mikko Rasa Date: Fri, 4 Dec 2009 07:36:45 +0000 (+0000) Subject: Fix compilation on 64-bit systems X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=525351c67a74fc3434fd1fb993bb9fa78b681f1f;p=libs%2Fgltk.git Fix compilation on 64-bit systems --- diff --git a/source/logic.cpp b/source/logic.cpp index ae93470..1644489 100644 --- a/source/logic.cpp +++ b/source/logic.cpp @@ -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); diff --git a/source/state.cpp b/source/state.cpp index 4e0a1de..6eaf336 100644 --- a/source/state.cpp +++ b/source/state.cpp @@ -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")) diff --git a/source/text.cpp b/source/text.cpp index 5f4095e..e4ec329 100644 --- a/source/text.cpp +++ b/source/text.cpp @@ -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;