summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjoye <joye>2014-07-03 20:05:58 (GMT)
committerjoye <joye>2014-07-03 20:05:58 (GMT)
commit8f5b98c9ae0abae3475332a53e5fc1a383537da2 (patch)
tree8bb5774abf92d36cddf6574281446671311f416d /src
parent31f4d98af92dcbeac7c2918b1a1cd81d917d1c02 (diff)
downloadblt-8f5b98c9ae0abae3475332a53e5fc1a383537da2.zip
blt-8f5b98c9ae0abae3475332a53e5fc1a383537da2.tar.gz
blt-8f5b98c9ae0abae3475332a53e5fc1a383537da2.tar.bz2
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/bltGrMarkerOption.C8
1 files changed, 4 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; ii<objc; ii+=2) {
@@ -120,8 +120,8 @@ static void CoordsFreeProc(ClientData clientData, Tk_Window tkwin,
Coords* coordsPtr = *(Coords**)ptr;
if (coordsPtr) {
if (coordsPtr->points)
- free(coordsPtr->points);
- free(coordsPtr);
+ delete [] coordsPtr->points;
+ delete coordsPtr;
}
}