]> git.lyx.org Git - features.git/commitdiff
add a const, use boost::assert
authorLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 27 Sep 2004 00:08:33 +0000 (00:08 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 27 Sep 2004 00:08:33 +0000 (00:08 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9014 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/gtk/ChangeLog
src/frontends/gtk/GToolbar.C
src/frontends/gtk/GXpmBtnTbl.C

index da09431f411403705fd746ab2c1c7c8864569e50..362747435a6b76cf58ce2002fc7a8e33a5ecf8d3 100644 (file)
@@ -1,3 +1,9 @@
+2004-09-27  Lars Gullik Bjonnes  <larsbj@gullik.net>
+
+       * GXpmBtnTbl.C (construct): use Boost.Assert
+
+       * GToolbar.C (update): make items const
+
 2004-09-27  John Spray  <spray_john@users.sourceforge.net>
 
        * GBC.C: Don't let the button controller set the label on GTK+
index d27042cf37e19205aa6d617a70936bd906fe556b..d049872b78d192b56396a013dfacc39180625f7e 100644 (file)
@@ -269,7 +269,7 @@ void GToolbar::show(bool)
 
 void GToolbar::update()
 {
-       int items = toolbar_.get_n_items();
+       int const items = toolbar_.get_n_items();
 
        for (int i = 0; i < items; ++i) {
                Gtk::ToolItem * item = toolbar_.get_nth_item(i);
index 53a6f5ef09e5155f8426c1025bd6578434d0b5a4..0db5c88306ed6f5bf8f37a688445e2bb36e5ff6d 100644 (file)
@@ -14,7 +14,7 @@
 
 #include <gtkmm.h>
 
-#include <cassert>
+#include <boost/assert.hpp>
 
 
 void GXpmBtnTbl::GXpmBtn::setXpm(XpmData xpm)
@@ -65,10 +65,10 @@ GXpmBtnTbl::~GXpmBtnTbl()
 
 void GXpmBtnTbl::construct()
 {
-       assert(rows_);
-       assert(cols_);
+       BOOST_ASSERT(rows_);
+       BOOST_ASSERT(cols_);
        btns_.reset(new GXpmBtn[rows_ * cols_]);
-       assert(btns_.get());
+       BOOST_ASSERT(btns_.get());
 
        for (int row = 0; row < rows_; ++row)
                for (int col = 0; col < cols_; ++col) {