[gegl/soc-2013-opecl-ops] poly2tri-c: fix compiler warnings
- From: Carlos Zubieta <czubieta src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/soc-2013-opecl-ops] poly2tri-c: fix compiler warnings
- Date: Thu, 19 Sep 2013 05:02:59 +0000 (UTC)
commit 0ef94f07c964515075228dcf8697de91cc68c05f
Author: Daniel Sabo <DanielSabo gmail com>
Date: Wed Sep 18 01:16:58 2013 -0700
poly2tri-c: fix compiler warnings
libs/poly2tri-c/poly2tri-c/p2t/common/shapes.c | 2 +-
libs/poly2tri-c/poly2tri-c/p2t/common/shapes.h | 2 +-
libs/poly2tri-c/poly2tri-c/p2t/sweep/sweep.c | 2 +-
libs/poly2tri-c/poly2tri-c/p2t/sweep/sweep.h | 2 +-
libs/poly2tri-c/poly2tri-c/refine/edge.h | 3 ++
libs/poly2tri-c/poly2tri-c/refine/triangle.c | 2 +-
libs/poly2tri-c/poly2tri-c/refine/vedge.c | 2 +-
libs/poly2tri-c/poly2tri-c/refine/vedge.h | 2 +-
libs/poly2tri-c/poly2tri-c/refine/visibility.c | 6 ++--
libs/poly2tri-c/poly2tri-c/render/mesh-render.c | 26 -----------------------
10 files changed, 13 insertions(+), 36 deletions(-)
---
diff --git a/libs/poly2tri-c/poly2tri-c/p2t/common/shapes.c b/libs/poly2tri-c/poly2tri-c/p2t/common/shapes.c
index 62fec89..463ac50 100644
--- a/libs/poly2tri-c/poly2tri-c/p2t/common/shapes.c
+++ b/libs/poly2tri-c/poly2tri-c/p2t/common/shapes.c
@@ -48,7 +48,7 @@ p2t_point_init (P2tPoint* THIS)
}
P2tPoint*
-p2t_point_new ()
+p2t_point_new (void)
{
P2tPoint* THIS = g_slice_new (P2tPoint);
p2t_point_init (THIS);
diff --git a/libs/poly2tri-c/poly2tri-c/p2t/common/shapes.h b/libs/poly2tri-c/poly2tri-c/p2t/common/shapes.h
index 914b37a..ee2f190 100644
--- a/libs/poly2tri-c/poly2tri-c/p2t/common/shapes.h
+++ b/libs/poly2tri-c/poly2tri-c/p2t/common/shapes.h
@@ -98,7 +98,7 @@ void p2t_point_init (P2tPoint* THIS);
* See #p2t_point_init. Note that when finished using the point, it must be
* freed by a call to #p2t_point_free and can not be freed like regular memory.
*/
-P2tPoint* p2t_point_new ();
+P2tPoint* p2t_point_new (void);
/**
* p2t_point_destroy:
diff --git a/libs/poly2tri-c/poly2tri-c/p2t/sweep/sweep.c b/libs/poly2tri-c/poly2tri-c/p2t/sweep/sweep.c
index 7680075..7c67a19 100644
--- a/libs/poly2tri-c/poly2tri-c/p2t/sweep/sweep.c
+++ b/libs/poly2tri-c/poly2tri-c/p2t/sweep/sweep.c
@@ -48,7 +48,7 @@ p2t_sweep_init (P2tSweep* THIS)
}
P2tSweep*
-p2t_sweep_new ()
+p2t_sweep_new (void)
{
P2tSweep* THIS = g_new (P2tSweep, 1);
p2t_sweep_init (THIS);
diff --git a/libs/poly2tri-c/poly2tri-c/p2t/sweep/sweep.h b/libs/poly2tri-c/poly2tri-c/p2t/sweep/sweep.h
index 7105fc4..5e8444f 100644
--- a/libs/poly2tri-c/poly2tri-c/p2t/sweep/sweep.h
+++ b/libs/poly2tri-c/poly2tri-c/p2t/sweep/sweep.h
@@ -55,7 +55,7 @@ P2tNodePtrArray nodes_;
};
void p2t_sweep_init (P2tSweep* THIS);
-P2tSweep* p2t_sweep_new ();
+P2tSweep* p2t_sweep_new (void);
/**
* Destructor - clean up memory
diff --git a/libs/poly2tri-c/poly2tri-c/refine/edge.h b/libs/poly2tri-c/poly2tri-c/refine/edge.h
index 4e44c44..9b56d4b 100644
--- a/libs/poly2tri-c/poly2tri-c/refine/edge.h
+++ b/libs/poly2tri-c/poly2tri-c/refine/edge.h
@@ -87,6 +87,9 @@ void p2tr_edge_free (P2trEdge *self);
void p2tr_edge_remove (P2trEdge *self);
+void p2tr_edge_get_diametral_circle (P2trEdge *self,
+ P2trCircle *circle);
+
P2trMesh* p2tr_edge_get_mesh (P2trEdge *self);
gboolean p2tr_edge_is_removed (P2trEdge *self);
diff --git a/libs/poly2tri-c/poly2tri-c/refine/triangle.c b/libs/poly2tri-c/poly2tri-c/refine/triangle.c
index ce28dcc..ef47083 100644
--- a/libs/poly2tri-c/poly2tri-c/refine/triangle.c
+++ b/libs/poly2tri-c/poly2tri-c/refine/triangle.c
@@ -41,7 +41,7 @@
#include "triangle.h"
#include "mesh.h"
-void
+static void
p2tr_validate_edges_can_form_tri (P2trEdge *AB,
P2trEdge *BC,
P2trEdge *CA)
diff --git a/libs/poly2tri-c/poly2tri-c/refine/vedge.c b/libs/poly2tri-c/poly2tri-c/refine/vedge.c
index 74a6a31..4044237 100644
--- a/libs/poly2tri-c/poly2tri-c/refine/vedge.c
+++ b/libs/poly2tri-c/poly2tri-c/refine/vedge.c
@@ -156,7 +156,7 @@ p2tr_vedge_try_get_and_unref (P2trVEdge *self,
}
P2trVEdgeSet*
-p2tr_vedge_set_new ()
+p2tr_vedge_set_new (void)
{
return p2tr_hash_set_new (
(GHashFunc) p2tr_vedge_undirected_hash,
diff --git a/libs/poly2tri-c/poly2tri-c/refine/vedge.h b/libs/poly2tri-c/poly2tri-c/refine/vedge.h
index 30f0e8f..1623dad 100644
--- a/libs/poly2tri-c/poly2tri-c/refine/vedge.h
+++ b/libs/poly2tri-c/poly2tri-c/refine/vedge.h
@@ -100,7 +100,7 @@ typedef P2trHashSet P2trVEdgeSet;
* be flipped to restore the Constrained Delaunay property to a
* triangulation
*/
-P2trVEdgeSet* p2tr_vedge_set_new ();
+P2trVEdgeSet* p2tr_vedge_set_new (void);
/**
* Add the given edge to the flip set. THE EDGE MUST HAVE BEEN REFFED
diff --git a/libs/poly2tri-c/poly2tri-c/refine/visibility.c b/libs/poly2tri-c/poly2tri-c/refine/visibility.c
index eab71ed..b0645ca 100644
--- a/libs/poly2tri-c/poly2tri-c/refine/visibility.c
+++ b/libs/poly2tri-c/poly2tri-c/refine/visibility.c
@@ -88,8 +88,8 @@
*/
#include <glib.h>
-#include "bounded-line.h"
-#include "pslg.h"
+
+#include "visibility.h"
static gboolean
@@ -381,7 +381,7 @@ TryVisibilityAroundBlock(P2trPSLG *PSLG,
* @ref Edges so that the line does not cross any of the lines of the
* PSLG @ref PSLG
*/
-gboolean
+static gboolean
IsVisibleFromEdges (P2trPSLG *PSLG,
P2trVector2 *P,
P2trPSLG *Edges)
diff --git a/libs/poly2tri-c/poly2tri-c/render/mesh-render.c b/libs/poly2tri-c/poly2tri-c/render/mesh-render.c
index 13f78db..f58bc3a 100644
--- a/libs/poly2tri-c/poly2tri-c/render/mesh-render.c
+++ b/libs/poly2tri-c/poly2tri-c/render/mesh-render.c
@@ -36,32 +36,6 @@
#include <poly2tri-c/refine/refine.h>
#include "mesh-render.h"
-/* This function implements box logic to see if a point is contained in a
- * triangles bounding box. This is very useful for cases where there are many
- * triangles to test against a single point, and most of them aren't even near
- * it.
- *
- * Instead of finding the Xmin, Xmax, Ymin, Ymax and checking if the the point
- * is outside, just check if the point is on the SAME SIDE compared to all the
- * points of the triangle.
- * See http://lightningismyname.blogspot.com/2011/08/quickboxa-quick-point-in-triangle-test.html
- */
-gboolean
-p2tr_triangle_quick_box_test (P2trTriangle *self,
- gdouble Px,
- gdouble Py)
-{
- P2trPoint *A = P2TR_TRIANGLE_GET_POINT (self, 0);
- P2trPoint *B = P2TR_TRIANGLE_GET_POINT (self, 1);
- P2trPoint *C = P2TR_TRIANGLE_GET_POINT (self, 2);
-
- register gboolean xPBorder = B->c.x <= Px;
- register gboolean yPBorder = B->c.y <= Py;
-
- return (((A->c.x <= Px) == xPBorder) && (xPBorder == (C->c.x <= Px)))
- || (((A->c.y <= Py) == yPBorder) && (yPBorder == (C->c.y <= Py)));
-}
-
void
p2tr_mesh_render_cache_uvt (P2trMesh *T,
P2trUVT *dest,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]