-// Copyright (C) 2006-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2023 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
CHRONO(10);
prepareGeometryChange();
_nbPoints = lp.size();
- _lp.reserve(_nbPoints+1);
- _directions.reserve(_nbPoints +2);
+ _lp.resize(_nbPoints+1);
+ _directions.resize(_nbPoints +2);
std::list<linkPoint>::const_iterator it = lp.begin();
int k=0;
qreal prevx = 0;
{
vector<QPointF> newlp;
vector<Direction> newdir;
- newlp.reserve(_nbPoints);
- newdir.reserve(_nbPoints +1);
+ newlp.resize(_nbPoints);
+ newdir.resize(_nbPoints +1);
bool modified = true;
while (modified)
{
vector<QPointF> newlp;
vector<Direction> newdir;
- newlp.reserve(_nbPoints+1);
- newdir.reserve(_nbPoints +2);
- //_lp.reserve(_nbPoints +1); // --- not OK : data may be lost! pre reserve enough before!
- //_directions.reserve(_nbPoints +2);
+ newlp.resize(_nbPoints+1);
+ newdir.resize(_nbPoints +2);
+ //_lp.resize(_nbPoints +1); // --- not OK : data may be lost! pre reserve enough before!
+ //_directions.resize(_nbPoints +2);
newlp[0] = _lp[0];
newlp[1] = _lp[0];
newlp[0].setY(a.y());