mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
No need for a deque here.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36728 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
82b712c1fc
commit
9cce351940
@ -85,7 +85,7 @@ void LastFilesSection::add(FileName const & file)
|
||||
LastFiles::iterator it = find(lastfiles.begin(), lastfiles.end(), file);
|
||||
if (it != lastfiles.end())
|
||||
lastfiles.erase(it);
|
||||
lastfiles.push_front(file);
|
||||
lastfiles.insert(lastfiles.begin(), file);
|
||||
if (lastfiles.size() > num_lastfiles)
|
||||
lastfiles.pop_back();
|
||||
}
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "support/FileName.h"
|
||||
#include "support/types.h"
|
||||
|
||||
#include <deque>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -58,7 +57,7 @@ class LastFilesSection : SessionSection
|
||||
{
|
||||
public:
|
||||
///
|
||||
typedef std::deque<support::FileName> LastFiles;
|
||||
typedef std::vector<support::FileName> LastFiles;
|
||||
|
||||
public:
|
||||
///
|
||||
@ -70,10 +69,10 @@ public:
|
||||
///
|
||||
void write(std::ostream & os) const;
|
||||
|
||||
/// Return lastfiles container (deque)
|
||||
/// Return lastfiles container (vector)
|
||||
LastFiles const lastFiles() const { return lastfiles; }
|
||||
|
||||
/** Insert #file# into the lastfile dequeue.
|
||||
/** Insert #file# into the lastfile vector.
|
||||
This funtion inserts #file# into the last files list. If the file
|
||||
already exists it is moved to the top of the list, else exist it
|
||||
is placed on the top of the list. If the list is full the last
|
||||
|
Loading…
Reference in New Issue
Block a user