summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-03-17 20:35:31 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-03-17 20:35:31 +0000
commit94a2d2364589c4a4795101187dab722f227a324a (patch)
tree3198874e5b35f0aaaeb04e2b17e07665c7cbf37c
parent200cde347298915e6acfdef94c99ae0b1a3ef377 (diff)
fix use of reserve() as revealed by _GLIBCXX_DEBUG
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3149 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/line.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/line.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/line.cc
index 5b12c69ba6..9c3bf6f4a5 100644
--- a/libs/libgnomecanvasmm/libgnomecanvasmm/line.cc
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/line.cc
@@ -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;