Merge pull request #47 from pierre-dejoue/pragma-once

Replace header guards by pragma once
This commit is contained in:
Jan Niklas Hasse 2022-05-09 10:08:46 +02:00 committed by GitHub
commit d6ecda3624
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 8 additions and 33 deletions

View File

@ -29,8 +29,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef DLL_SYMBOL_H #pragma once
#define DLL_SYMBOL_H
#if defined(_WIN32) #if defined(_WIN32)
# define P2T_COMPILER_DLLEXPORT __declspec(dllexport) # define P2T_COMPILER_DLLEXPORT __declspec(dllexport)
@ -52,5 +51,3 @@
# define P2T_DLL_SYMBOL P2T_COMPILER_DLLIMPORT # define P2T_DLL_SYMBOL P2T_COMPILER_DLLIMPORT
# endif # endif
#endif #endif
#endif

View File

@ -29,9 +29,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
// Include guard #pragma once
#ifndef SHAPES_H
#define SHAPES_H
#include "dll_symbol.h" #include "dll_symbol.h"
@ -329,5 +327,3 @@ inline void Triangle::IsInterior(bool b)
P2T_DLL_SYMBOL bool IsDelaunay(const std::vector<p2t::Triangle*>&); P2T_DLL_SYMBOL bool IsDelaunay(const std::vector<p2t::Triangle*>&);
} }
#endif

View File

@ -29,8 +29,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef UTILS_H #pragma once
#define UTILS_H
// Otherwise #defines like M_PI are undeclared under Visual Studio // Otherwise #defines like M_PI are undeclared under Visual Studio
#define _USE_MATH_DEFINES #define _USE_MATH_DEFINES
@ -129,5 +128,3 @@ bool InScanArea(const Point& pa, const Point& pb, const Point& pc, const Point&
} }
} }
#endif

View File

@ -29,10 +29,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef POLY2TRI_H #pragma once
#define POLY2TRI_H
#include "common/shapes.h" #include "common/shapes.h"
#include "sweep/cdt.h" #include "sweep/cdt.h"
#endif

View File

@ -29,8 +29,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef ADVANCED_FRONT_H #pragma once
#define ADVANCED_FRONT_H
#include "../common/shapes.h" #include "../common/shapes.h"
@ -114,5 +113,3 @@ inline void AdvancingFront::set_search(Node* node)
} }
} }
#endif

View File

@ -29,8 +29,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef CDT_H #pragma once
#define CDT_H
#include "advancing_front.h" #include "advancing_front.h"
#include "sweep_context.h" #include "sweep_context.h"
@ -103,5 +102,3 @@ public:
}; };
} }
#endif

View File

@ -36,8 +36,7 @@
* "FlipScan" Constrained Edge Algorithm invented by Thomas Åhlén, thahlen@gmail.com * "FlipScan" Constrained Edge Algorithm invented by Thomas Åhlén, thahlen@gmail.com
*/ */
#ifndef SWEEP_H #pragma once
#define SWEEP_H
#include <vector> #include <vector>
@ -281,5 +280,3 @@ private:
}; };
} }
#endif

View File

@ -29,8 +29,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef SWEEP_CONTEXT_H #pragma once
#define SWEEP_CONTEXT_H
#include <list> #include <list>
#include <vector> #include <vector>
@ -183,5 +182,3 @@ inline Point* SweepContext::tail() const
} }
} }
#endif