mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-27 03:36:39 +00:00
Readd comment and squeeze warning.
Is gcc quiet too now ? git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32937 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7a7ab8f14b
commit
fd0dfe1b79
@ -206,13 +206,14 @@ public:
|
|||||||
Vn_.clear();
|
Vn_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Gets the value at index. If it is not in the vector
|
||||||
|
/// the default value is inserted and returned.
|
||||||
T & operator[](int index) {
|
T & operator[](int index) {
|
||||||
vector<T> & V = index >= 0 ? Vp_ : Vn_;
|
vector<T> & V = index >= 0 ? Vp_ : Vn_;
|
||||||
if (index < 0)
|
unsigned int const ii = index >= 0 ? index : -index - 1;
|
||||||
index = -index-1;
|
while (ii >= V.size())
|
||||||
while (index >= V.size())
|
|
||||||
V.push_back(default_);
|
V.push_back(default_);
|
||||||
return V[index];
|
return V[ii];
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user