fix use of reserve() as revealed by _GLIBCXX_DEBUG
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 17 Mar 2008 20:35:31 +0000 (20:35 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 17 Mar 2008 20:35:31 +0000 (20:35 +0000)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3149 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/libgnomecanvasmm/libgnomecanvasmm/line.cc

index 5b12c69ba680cec3eeb6750de10a40879512e8e2..9c3bf6f4a5132c3952ba4fe97356e11731f08143 100644 (file)
@@ -40,7 +40,9 @@ Points::Points(size_type nbpoints)
 Points::Points(GnomeCanvasPoints *castitem)
 : points_(castitem),owned_(false)
 {
-  reserve(points_->num_points);
+  while (size() < points_->num_points) {
+       push_back (Art::Point());
+  }
 
   //GnomeCanvasPoints has an array of doubles, used 2 at a time:
   int i = 0;