From 1ad6d1ed6bda8a11f0922c33445c6fb52c0ffa96 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Thu, 12 Jul 2012 15:40:42 +0000
Subject: [PATCH] Gained 10% of time....

---
 src/triangle.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/triangle.c b/src/triangle.c
index e051316..dc53487 100644
--- a/src/triangle.c
+++ b/src/triangle.c
@@ -147,11 +147,13 @@
         //fatal("In triangle_remove_neighbour: Specified neighbour does not exist for given triangle",3);
     }
     tria->neigh_no--;
+//	fprintf(stderr,"*** tria_number=%d\n",tria->neigh_no);
     tria->neigh=(ts_triangle **)realloc(tria->neigh,tria->neigh_no*sizeof(ts_triangle *));
 	if(tria->neigh == NULL){
 		fatal("Reallocation of memory failed during removal of vertex neighbour in triangle_remove_neighbour",100);
 	}
 /* we repeat the procedure for neighbour */
+	j=0;
     for(i=0;i<ntria->neigh_no;i++){
         if(ntria->neigh[i]!=tria){
             ntria->neigh[j]=ntria->neigh[i];
@@ -163,6 +165,7 @@
         //fatal("In triangle_remove_neighbour: Specified neighbour does not exist for given triangle",3);
     }
     ntria->neigh_no--;
+//	fprintf(stderr,"*** ntria_number=%d\n",ntria->neigh_no);
     ntria->neigh=(ts_triangle **)realloc(ntria->neigh,ntria->neigh_no*sizeof(ts_triangle *));
 	if(ntria->neigh == NULL){
 		fatal("Reallocation of memory failed during removal of vertex neighbour in triangle_remove_neighbour",100);

--
Gitblit v1.9.3