mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22526 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f925113312
commit
560f4336fa
@ -40,17 +40,23 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
InsetList::iterator InsetList::insetIterator(pos_type pos)
|
||||
@ -120,29 +126,17 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user