Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace header guards by pragma once #47

Merged
merged 1 commit into from
May 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions poly2tri/common/dll_symbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef DLL_SYMBOL_H
#define DLL_SYMBOL_H
#pragma once

#if defined(_WIN32)
# define P2T_COMPILER_DLLEXPORT __declspec(dllexport)
Expand All @@ -52,5 +51,3 @@
# define P2T_DLL_SYMBOL P2T_COMPILER_DLLIMPORT
# endif
#endif

#endif
6 changes: 1 addition & 5 deletions poly2tri/common/shapes.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

// Include guard
#ifndef SHAPES_H
#define SHAPES_H
#pragma once

#include "dll_symbol.h"

Expand Down Expand Up @@ -329,5 +327,3 @@ inline void Triangle::IsInterior(bool b)
P2T_DLL_SYMBOL bool IsDelaunay(const std::vector<p2t::Triangle*>&);

}

#endif
5 changes: 1 addition & 4 deletions poly2tri/common/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef UTILS_H
#define UTILS_H
#pragma once

// Otherwise #defines like M_PI are undeclared under Visual Studio
#define _USE_MATH_DEFINES
Expand Down Expand Up @@ -129,5 +128,3 @@ bool InScanArea(const Point& pa, const Point& pb, const Point& pc, const Point&
}

}

#endif
5 changes: 1 addition & 4 deletions poly2tri/poly2tri.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef POLY2TRI_H
#define POLY2TRI_H
#pragma once

#include "common/shapes.h"
#include "sweep/cdt.h"

#endif
5 changes: 1 addition & 4 deletions poly2tri/sweep/advancing_front.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef ADVANCED_FRONT_H
#define ADVANCED_FRONT_H
#pragma once

#include "../common/shapes.h"

Expand Down Expand Up @@ -114,5 +113,3 @@ inline void AdvancingFront::set_search(Node* node)
}

}

#endif
5 changes: 1 addition & 4 deletions poly2tri/sweep/cdt.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef CDT_H
#define CDT_H
#pragma once

#include "advancing_front.h"
#include "sweep_context.h"
Expand Down Expand Up @@ -103,5 +102,3 @@ class P2T_DLL_SYMBOL CDT
};

}

#endif
5 changes: 1 addition & 4 deletions poly2tri/sweep/sweep.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
* "FlipScan" Constrained Edge Algorithm invented by Thomas �hl�n, thahlen@gmail.com
*/

#ifndef SWEEP_H
#define SWEEP_H
#pragma once

#include <vector>

Expand Down Expand Up @@ -281,5 +280,3 @@ class Sweep
};

}

#endif
5 changes: 1 addition & 4 deletions poly2tri/sweep/sweep_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef SWEEP_CONTEXT_H
#define SWEEP_CONTEXT_H
#pragma once

#include <list>
#include <vector>
Expand Down Expand Up @@ -183,5 +182,3 @@ inline Point* SweepContext::tail() const
}

}

#endif