]> git.lyx.org Git - features.git/commitdiff
cosmetics
authorAndré Pönitz <poenitz@gmx.net>
Sat, 12 Jan 2008 16:40:25 +0000 (16:40 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Sat, 12 Jan 2008 16:40:25 +0000 (16:40 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22526 a592a061-630c-0410-9148-cb99ea01b6c8

src/InsetList.cpp

index 1f205858794ef899ac7aabeb2d0d214dcaf85cf1..b7e453ce9d86578c8424d00e515b76b4d93fd4de 100644 (file)
@@ -40,16 +40,22 @@ struct InsetTablePosLess
 } // namespace anon
 
 
+InsetList::InsetList(InsetList const & il)
+{
+       list_ = il.list_;
+       List::iterator it = list_.begin();
+       List::iterator end = list_.end();
+       for (; it != end; ++it)
+               it->inset = it->inset->clone();
+}
+
 
 InsetList::~InsetList()
 {
-       // If we begin storing a shared_ptr in the List
-       // this code can be removed. (Lgb)
        List::iterator it = list_.begin();
        List::iterator end = list_.end();
-       for (; it != end; ++it) {
+       for (; it != end; ++it)
                delete it->inset;
-       }
 }
 
 
@@ -120,9 +126,8 @@ void InsetList::increasePosAfterPos(pos_type pos)
 {
        List::iterator end = list_.end();
        List::iterator it = insetIterator(pos);
-       for (; it != end; ++it) {
+       for (; it != end; ++it)
                ++it->pos;
-       }
 }
 
 
@@ -130,19 +135,8 @@ void InsetList::decreasePosAfterPos(pos_type pos)
 {
        List::iterator end = list_.end();
        List::iterator it = insetIterator(pos);
-       for (; it != end; ++it) {
-               --it->pos;
-       }
-}
-
-
-InsetList::InsetList(InsetList const & il)
-{
-       list_ = il.list_;
-       List::iterator it = list_.begin();
-       List::iterator end = list_.end();
        for (; it != end; ++it)
-               it->inset = it->inset->clone();
+               --it->pos;
 }