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:
Vincent van Ravesteijn 2010-01-10 13:54:06 +00:00
parent 7a7ab8f14b
commit fd0dfe1b79

View File

@ -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: