mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
gcc compilation fix and introduce new splice method.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30959 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1a27aaca77
commit
0821902b99
@ -13,6 +13,7 @@
|
||||
#ifndef RANDOM_ACESS_LIST_H
|
||||
#define RANDOM_ACESS_LIST_H
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <list>
|
||||
|
||||
@ -248,13 +249,19 @@ public:
|
||||
|
||||
void swap(size_t i, size_t j)
|
||||
{
|
||||
size_t const p = max(i, j);
|
||||
size_t const q = min(i, j);
|
||||
size_t const p = std::max(i, j);
|
||||
size_t const q = std::min(i, j);
|
||||
container_.splice(iterCont_[p], container_, iterCont_[q]);
|
||||
container_.splice(iterCont_[q], container_, iterCont_[p]);
|
||||
recreateVector();
|
||||
}
|
||||
|
||||
void splice(iterator where, iterator first, iterator last)
|
||||
{
|
||||
container_.splice(where, container_, first, last);
|
||||
recreateVector();
|
||||
}
|
||||
|
||||
void swap(RandomAccessList & x)
|
||||
{
|
||||
std::swap(container_, x.container_);
|
||||
|
Loading…
Reference in New Issue
Block a user