}
else
{
- assert (0);
+ g_assert_not_reached ();
}
}
{
return 2;
}
- assert (0);
+ g_assert_not_reached ();
+ /* Return a value to silence some compilers */
+ return -1;
}
int
{
return THIS->points_[1];
}
- assert (0);
+
+ g_assert_not_reached ();
+ /* Return a value to silence some compilers */
+ return NULL;
}
/* The point counter-clockwise to given point */
{
return THIS->points_[0];
}
- assert (0);
+ g_assert_not_reached ();
+ /* Return a value to silence some compilers */
+ return NULL;
}
/* The neighbor clockwise to given point */
void
p2t_sweep_destroy (P2tSweep* THIS)
{
- int i;
+ guint i;
/* Clean up memory */
for (i = 0; i < THIS->nodes_->len; i++)
{
void
p2t_sweep_sweep_points (P2tSweep *THIS, P2tSweepContext *tcx)
{
- int i, j;
+ int i;
+ guint j;
for (i = 1; i < p2t_sweepcontext_point_count (tcx); i++)
{
P2tPoint* point = p2t_sweepcontext_get_point (tcx, i);
}
else
{
- /*throw new RuntimeException("[Unsupported] Opposing point on constrained edge");*/
- assert (0);
+ g_error ("[Unsupported] Opposing point on constrained edge");
+ /* Return a value to silence some compilers */
+ return NULL;
}
}
void
p2t_sweepcontext_init (P2tSweepContext* THIS, P2tPointPtrArray polyline)
{
- int i;
+ guint i;
THIS->front_ = NULL;
THIS->head_ = NULL;
p2t_sweepcontext_destroy (P2tSweepContext* THIS)
{
GList* iter;
- int i;
+ guint i;
/* Clean up memory */
p2t_point_free (THIS->head_);
void
p2t_sweepcontext_add_hole (P2tSweepContext *THIS, P2tPointPtrArray polyline)
{
- int i;
+ guint i;
p2t_sweepcontext_init_edges (THIS, polyline);
for (i = 0; i < polyline->len; i++)
{
void
p2t_sweepcontext_init_triangulation (P2tSweepContext *THIS)
{
- int i;
+ guint i;
double xmax = point_index (THIS->points_, 0)->x, xmin = point_index (THIS->points_, 0)->x;
double ymax = point_index (THIS->points_, 0)->y, ymin = point_index (THIS->points_, 0)->y;
double dx, dy;
#include "edge.h"
#include "vedge.h"
-#include "cdt.h"
-#include "utils.h"
+#include "rcdt.h"
+#include "rutils.h"
/**
* Flip-Fix all the virtual edges inside the given set
#include <math.h>
#include <glib.h>
-#include "utils.h"
+#include "rutils.h"
#include "point.h"
#include "edge.h"
#include <math.h>
#include <glib.h>
-#include "utils.h"
+#include "rutils.h"
#include "rmath.h"
#include "point.h"
#include "triangle.h"
#include "mesh.h"
-#include "cdt.h"
+#include "rcdt.h"
#include "cluster.h"
#include "vedge.h"
{
P2trCluster *startCluster = p2tr_cluster_get_for (P2TR_EDGE_START(s), s);
P2trCluster *endCluster = p2tr_cluster_get_for (s->end, s);
- P2trCluster *S_NOREF;
+ P2trCluster *S_NOREF = NULL;
GList *iter;
gboolean permitted = FALSE;
#define __P2TC_REFINE_DELAUNAY_TERMINATOR_H__
#include <glib.h>
-#include "cdt.h"
+#include "rcdt.h"
#include "refiner.h"
#include "vedge.h"
*/
#include <glib.h>
-#include "utils.h"
+#include "rutils.h"
#include "mesh.h"
#include "point.h"
#include <stdio.h>
#include <glib.h>
#include "vector2.h"
-#include "utils.h"
+#include "rutils.h"
#include "triangulation.h"
/**
#ifndef __P2TC_REFINE_PSLG_H__
#define __P2TC_REFINE_PSLG_H__
-#include "utils.h"
+#include "rutils.h"
#include "vector2.h"
#include "line.h"
#include "bounded-line.h"
#include "edge.h"
#include "triangle.h"
-#include "cdt.h"
+#include "rcdt.h"
#include "visibility.h"
#include "cdt-flipfix.h"
P2trVEdgeSet *new_edges = p2tr_vedge_set_new ();
- gint i, j;
+ guint i, j;
rmesh->mesh = p2tr_mesh_new ();
rmesh->outline = p2tr_pslg_new ();
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef __P2TC_REFINE_CDT_H__
-#define __P2TC_REFINE_CDT_H__
+#ifndef __P2TC_REFINE_RCDT_H__
+#define __P2TC_REFINE_RCDT_H__
#include <poly2tri-c/p2t/poly2tri.h>
#include "mesh.h"
#ifndef __P2TC_REFINE_H__
#define __P2TC_REFINE_H__
-#include "utils.h"
+#include "rutils.h"
#include "rmath.h"
#include "vector2.h"
#include "vtriangle.h"
#include "cluster.h"
-#include "cdt.h"
+#include "rcdt.h"
#include "refiner.h"
#endif
*/
#include <glib.h>
-#include "cdt.h"
+#include "rcdt.h"
#include "delaunay-terminator.h"
#include "refiner.h"
#define __P2TC_REFINE_REFINER_H__
#include <glib.h>
-#include "cdt.h"
+#include "rcdt.h"
typedef struct P2trRefiner_ P2trRefiner;
#include <stdarg.h>
#include <glib.h>
-#include "utils.h"
+#include "rutils.h"
GList*
p2tr_utils_new_reversed_pointer_list (int count, ...)
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef __P2TC_REFINE_UTILS_H__
-#define __P2TC_REFINE_UTILS_H__
+#ifndef __P2TC_REFINE_RUTILS_H__
+#define __P2TC_REFINE_RUTILS_H__
#ifdef __cplusplus
extern "C"
#include <math.h>
#include <glib.h>
-#include "utils.h"
+#include "rutils.h"
#include "rmath.h"
#include "point.h"
#define __P2TC_REFINE_VEDGE_H__
#include <glib.h>
-#include "utils.h"
+#include "rutils.h"
#include "triangulation.h"
/**
guint line_count)
{
P2trPSLG *edges = p2tr_pslg_new ();
- gint i;
+ guint i;
gboolean result;
for (i = 0; i < line_count; i++)
gint dest_len,
P2trImageConfig *config)
{
- gint x, y, n = dest_len;
+ guint x, y, n = dest_len;
P2trUVT *uvt = dest;
P2trTriangle *tr_prev = NULL;
P2trVector2 pt;