]> git.tdb.fi Git - libs/gltk.git/commitdiff
Fix a 64-bit compilation problem
authorMikko Rasa <tdb@tdb.fi>
Wed, 16 Jan 2013 17:02:50 +0000 (19:02 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 16 Jan 2013 17:02:50 +0000 (19:02 +0200)
source/text.cpp

index 08846a4c75acd587fa47bce8dd1b835cbd42e153..af6b17f85e14946b23088909c26cd056dcbe4768 100644 (file)
@@ -231,8 +231,8 @@ void Text::process_lines(const Part &part, const Geometry &parent, unsigned firs
        int y_offset = static_cast<int>(-font.get_descent()*font_size);
 
        const Sides &margin = part.get_margin();
-       unsigned n_lines = min(lines.size(), max((parent.h-margin.top-margin.bottom)/line_spacing, 1U));
-       first_row = min(first_row, lines.size()-n_lines);
+       unsigned n_lines = min<unsigned>(lines.size(), max((parent.h-margin.top-margin.bottom)/line_spacing, 1U));
+       first_row = min<unsigned>(first_row, lines.size()-n_lines);
 
        for(unsigned i=0; i<n_lines; ++i)
        {