]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/dropdown.cpp
Use size_t to represent counts and indices
[libs/gltk.git] / source / dropdown.cpp
index 68c1beed1321fea803981b36701246576273a397..ab00c4c3f0c7bd06c0edc453d18c0315ebf36063 100644 (file)
@@ -51,7 +51,7 @@ void Dropdown::autosize_special(const Part &part, Geometry &ageom) const
 
                unsigned max_w = 0;
                const ListData &data = list.get_data();
-               for(unsigned i=0; i<data.size(); ++i)
+               for(size_t i=0; i<data.size(); ++i)
                {
                        unsigned w = static_cast<unsigned>(font.get_string_width(data.get_string(i))*font_size);
                        max_w = max(max_w, w);
@@ -177,7 +177,7 @@ void Dropdown::resize_list()
        list.set_geometry(lgeom);
 }
 
-void Dropdown::list_item_selected(unsigned index)
+void Dropdown::list_item_selected(size_t index)
 {
        if(dropped)
        {