]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gtk/GBox.C
use size_t instead of unsigned int where appropriate
[lyx.git] / src / frontends / gtk / GBox.C
index 1be4cfbecb92948665e5c717c599dbf25f691bb5..a1cd1b3412e869d4566354d4e5cf00611d9006bb 100644 (file)
 
 #include <config.h>
 
+// Too hard to make concept checks work with this file
+#ifdef _GLIBCPP_CONCEPT_CHECKS
+#undef _GLIBCPP_CONCEPT_CHECKS
+#endif
+
 #include "GBox.h"
 
 #include "ghelpers.h"
@@ -147,7 +152,7 @@ void GBox::update()
        contenthorzcombo_->set_active(string("lcrs").find(c, 0));
 
        string type(controller().params().type);
-       for (unsigned int i = 0; i < gui_names_.size(); ++i) {
+       for (size_t i = 0; i < gui_names_.size(); ++i) {
                if (type == ids_[i])
                        typecombo_->set_active(i);
        }
@@ -169,11 +174,12 @@ void GBox::update()
        string const special(controller().params().special);
        if (!special.empty() && special != "none") {
                string spc;
-               for (unsigned int i = 0; i < gui_names_spec_.size(); ++i) {
+               for (size_t i = 0; i < gui_names_spec_.size(); ++i) {
                        if (special == ids_spec_[i])
                                spc = gui_names_spec_[i];
                }
-               for (int j = 0; j < widthunitsstore_->children().size(); ++j) {
+               for (size_t j = 0; j 
+                       < widthunitsstore_->children().size(); ++j) {
                        if (widthunitsstore_->children()[j][stringcol_] == spc)
                                widthunitscombo_->set_active(j);
                }
@@ -186,12 +192,12 @@ void GBox::update()
        string const height_special(controller().params().height_special);
        if (!height_special.empty() && height_special != "none") {
                string hspc;
-               for (unsigned int i = 0; i < gui_names_spec_.size(); ++i) {
+               for (size_t i = 0; i < gui_names_spec_.size(); ++i) {
                        if (height_special == ids_spec_[i]) {
                                hspc = gui_names_spec_[i];
                        }
                }
-               for (int j = 0; j < heightunitscombo_->get_model()->children().size(); ++j) {
+               for (size_t j = 0; j < heightunitscombo_->get_model()->children().size(); ++j) {
                        if (heightunitscombo_->get_model()->children()[j][stringcol_] == hspc) {
                                heightunitscombo_->set_active(j);
                        }
@@ -229,7 +235,7 @@ void GBox::setSpecial(bool ibox)
                        (*widthunitsstore_->append())[stringcol_] = *it;
        }
 
-       int const store_size = widthunitsstore_->children().size();
+       size_t const store_size = widthunitsstore_->children().size();
        if (initselection >= store_size) {
                widthunitscombo_->set_active(0);
                onWidthChanged();
@@ -248,7 +254,7 @@ void GBox::updateInnerBoxCombo()
        // we have to remove "none" then and adjust the combo
 
        // default: minipage
-       unsigned int i = 2;
+       int i = 2;
        if (!controller().params().inner_box)
                // none
                i = 0;
@@ -352,7 +358,7 @@ void GBox::onHeightChanged()
        int i = 0;
        bool spec = false;
        Glib::ustring special = (*heightunitscombo_->get_active())[stringcol_];
-       for (int j = 1; j < gui_names_spec_.size() ; ++j) {
+       for (size_t j = 1; j < gui_names_spec_.size() ; ++j) {
                if (gui_names_spec_[j] == special) {
                        i=j;
                        spec = true;
@@ -384,9 +390,9 @@ void GBox::onWidthChanged()
        int i = 0;
        bool spec = false;
        Glib::ustring special = (*widthunitscombo_->get_active())[stringcol_];
-       for (int j = 1; j < gui_names_spec_.size() ; ++j) {
+       for (size_t j = 1; j < gui_names_spec_.size() ; ++j) {
                if (gui_names_spec_[j] == special) {
-                       i=j;
+                       i = j;
                        spec = true;
                }
        }