From 8f5b98c9ae0abae3475332a53e5fc1a383537da2 Mon Sep 17 00:00:00 2001 From: joye Date: Thu, 3 Jul 2014 20:05:58 +0000 Subject: *** empty log message *** --- src/bltGrMarkerOption.C | 8 ++++---- tests/polygonmarker.tcl | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/bltGrMarkerOption.C b/src/bltGrMarkerOption.C index 326636f..7797bc4 100644 --- a/src/bltGrMarkerOption.C +++ b/src/bltGrMarkerOption.C @@ -73,9 +73,9 @@ static int CoordsSetProc(ClientData clientData, Tcl_Interp* interp, return TCL_ERROR; } - Coords* coordsPtr = (Coords*)calloc(1,sizeof(Coords)); + Coords* coordsPtr = new Coords; coordsPtr->num = objc/2; - coordsPtr->points = (Point2d*)calloc(coordsPtr->num, sizeof(Point2d)); + coordsPtr->points = new Point2d[coordsPtr->num]; Point2d* pp = coordsPtr->points; for (int ii=0; iipoints) - free(coordsPtr->points); - free(coordsPtr); + delete [] coordsPtr->points; + delete coordsPtr; } } diff --git a/tests/polygonmarker.tcl b/tests/polygonmarker.tcl index e562821..e8e63b3 100644 --- a/tests/polygonmarker.tcl +++ b/tests/polygonmarker.tcl @@ -8,6 +8,7 @@ set mm [$graph marker create polygon tt -element data2 \ $graph element configure data1 -hide yes echo "Testing Polygon Marker..." +return bltTest3 $graph marker $mm -bindtags {aa} 0 bltTest3 $graph marker $mm -cap round $dops -- cgit v0.12