diff --git a/poly2tri/common/utils.h b/poly2tri/common/utils.h index 2fc3b5b..23c435d 100644 --- a/poly2tri/common/utils.h +++ b/poly2tri/common/utils.h @@ -28,6 +28,9 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#ifndef UTILS_H +#define UTILS_H #include #include @@ -95,3 +98,5 @@ bool InScanArea(Point& pa, Point& pb, Point& pc, Point& pd) } +#endif + diff --git a/poly2tri/poly2tri.h b/poly2tri/poly2tri.h index eab8910..487755e 100644 --- a/poly2tri/poly2tri.h +++ b/poly2tri/poly2tri.h @@ -28,6 +28,12 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#ifndef POLY2TRI_H +#define POLY2TRI_H + #include "common/shapes.h" #include "sweep/cdt.h" +#endif + diff --git a/poly2tri/sweep/advancing_front.h b/poly2tri/sweep/advancing_front.h index 5b9b299..4354905 100644 --- a/poly2tri/sweep/advancing_front.h +++ b/poly2tri/sweep/advancing_front.h @@ -28,6 +28,10 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#ifndef ADVANCED_FRONT_H +#define ADVANCED_FRONT_H + #include "../common/shapes.h" namespace p2t { @@ -112,3 +116,4 @@ inline void AdvancingFront::set_search(Node* node) } +#endif diff --git a/poly2tri/sweep/cdt.h b/poly2tri/sweep/cdt.h index eb007b1..9288ee6 100644 --- a/poly2tri/sweep/cdt.h +++ b/poly2tri/sweep/cdt.h @@ -28,6 +28,10 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#ifndef CDT_H +#define CDT_H + #include "advancing_front.h" #include "sweep_context.h" #include "sweep.h" @@ -61,3 +65,5 @@ Sweep* sweep_; }; } + +#endif diff --git a/poly2tri/sweep/sweep.h b/poly2tri/sweep/sweep.h index bf94d61..02bf9ab 100644 --- a/poly2tri/sweep/sweep.h +++ b/poly2tri/sweep/sweep.h @@ -35,6 +35,9 @@ * * "FlipScan" Constrained Edge Algorithm invented by Thomas Åhlén, thahlen@gmail.com */ + +#ifndef SWEEP_H +#define SWEEP_H namespace p2t { @@ -113,3 +116,5 @@ void FinalizationPolygon(SweepContext& tcx); }; } + +#endif diff --git a/poly2tri/sweep/sweep_context.h b/poly2tri/sweep/sweep_context.h index 6a64c0d..b70e853 100644 --- a/poly2tri/sweep/sweep_context.h +++ b/poly2tri/sweep/sweep_context.h @@ -28,6 +28,10 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +#ifndef SWEEP_CONTEXT_H +#define SWEEP_CONTEXT_H + #include #include @@ -177,3 +181,5 @@ inline Point* SweepContext::tail() } } + +#endif