mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
gcc compile fix: vector::insert() requires an iterator, not a const_iterator.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26642 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f40a74eae2
commit
b54b51c694
@ -413,7 +413,7 @@ void Changes::addToToc(DocIterator const & cdit, Buffer const & buffer) const
|
||||
dit.pos() = it->range.start;
|
||||
str += " " + dit.paragraph().asString(it->range.start, it->range.end);
|
||||
docstring const & author = author_list.get(it->change.author).name();
|
||||
Toc::const_iterator it = change_list.item(0, author);
|
||||
Toc::iterator it = change_list.item(0, author);
|
||||
if (it == change_list.end()) {
|
||||
change_list.push_back(TocItem(dit, 0, author));
|
||||
change_list.push_back(TocItem(dit, 1, str));
|
||||
|
@ -203,12 +203,12 @@ TocIterator Toc::item(DocIterator const & dit) const
|
||||
}
|
||||
|
||||
|
||||
TocIterator Toc::item(int depth, docstring const & str) const
|
||||
Toc::iterator Toc::item(int depth, docstring const & str)
|
||||
{
|
||||
if (empty())
|
||||
return end();
|
||||
TocIterator it = begin();
|
||||
TocIterator itend = end();
|
||||
iterator it = begin();
|
||||
iterator itend = end();
|
||||
for (; it != itend; ++it) {
|
||||
if (it->depth() == depth && it->str() == str)
|
||||
break;
|
||||
|
@ -75,11 +75,12 @@ class Toc : public std::vector<TocItem>
|
||||
{
|
||||
public:
|
||||
typedef std::vector<TocItem>::const_iterator const_iterator;
|
||||
typedef std::vector<TocItem>::iterator iterator;
|
||||
const_iterator item(DocIterator const & dit) const;
|
||||
/// Look for a TocItem given its depth and string.
|
||||
/// \return The first matching item.
|
||||
/// \retval end() if no item was found.
|
||||
const_iterator item(int depth, docstring const & str) const;
|
||||
iterator item(int depth, docstring const & str);
|
||||
};
|
||||
|
||||
typedef Toc::const_iterator TocIterator;
|
||||
|
Loading…
Reference in New Issue
Block a user