From e2bcea90fce8a1e05e517c615d21d845e955f53d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Wed, 25 May 2016 21:14:18 +0200 Subject: [core] use #pragma once instead of ifdef include guards --- include/mbgl/util/chrono.hpp | 5 +---- include/mbgl/util/constants.hpp | 5 +---- include/mbgl/util/default_styles.hpp | 5 +---- include/mbgl/util/enum.hpp | 5 +---- include/mbgl/util/exception.hpp | 5 +---- include/mbgl/util/geo.hpp | 5 +---- include/mbgl/util/image.hpp | 5 +---- include/mbgl/util/noncopyable.hpp | 5 +---- include/mbgl/util/optional.hpp | 5 +---- include/mbgl/util/projection.hpp | 5 +---- include/mbgl/util/run_loop.hpp | 5 +---- include/mbgl/util/string.hpp | 5 +---- include/mbgl/util/timer.hpp | 5 +---- include/mbgl/util/traits.hpp | 5 +---- include/mbgl/util/unitbezier.hpp | 5 +---- include/mbgl/util/util.hpp | 5 +---- include/mbgl/util/work_request.hpp | 5 +---- include/mbgl/util/work_task.hpp | 5 +---- 18 files changed, 18 insertions(+), 72 deletions(-) (limited to 'include/mbgl/util') diff --git a/include/mbgl/util/chrono.hpp b/include/mbgl/util/chrono.hpp index 81f05d610d..48460d3377 100644 --- a/include/mbgl/util/chrono.hpp +++ b/include/mbgl/util/chrono.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_CHRONO -#define MBGL_UTIL_CHRONO +#pragma once #include #include @@ -42,5 +41,3 @@ constexpr std::chrono::duration abs(std::chrono::duration @@ -59,5 +58,3 @@ extern const bool shapingWarning; } // namespace debug } // namespace mbgl - -#endif diff --git a/include/mbgl/util/default_styles.hpp b/include/mbgl/util/default_styles.hpp index 05015ab4c9..eb7e034722 100644 --- a/include/mbgl/util/default_styles.hpp +++ b/include/mbgl/util/default_styles.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_PLATFORM_DEFAULT_STYLES -#define MBGL_PLATFORM_DEFAULT_STYLES +#pragma once #include #include @@ -30,5 +29,3 @@ static const unsigned currentVersion = 9; } // end namespace default_styles } // end namespace util } // end namespace mbgl - -#endif diff --git a/include/mbgl/util/enum.hpp b/include/mbgl/util/enum.hpp index 5d64ed6718..3fbf313aed 100644 --- a/include/mbgl/util/enum.hpp +++ b/include/mbgl/util/enum.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_ENUM -#define MBGL_UTIL_ENUM +#pragma once #include #include @@ -51,5 +50,3 @@ public: } // namespace mbgl -#endif - diff --git a/include/mbgl/util/exception.hpp b/include/mbgl/util/exception.hpp index b2214b36b8..b73a94fcd2 100644 --- a/include/mbgl/util/exception.hpp +++ b/include/mbgl/util/exception.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_EXCEPTION -#define MBGL_UTIL_EXCEPTION +#pragma once #include @@ -28,5 +27,3 @@ struct ShaderException : Exception { } // namespace util } // namespace mbgl - -#endif diff --git a/include/mbgl/util/geo.hpp b/include/mbgl/util/geo.hpp index 86274c1a7c..7e15d5c2f1 100644 --- a/include/mbgl/util/geo.hpp +++ b/include/mbgl/util/geo.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_GEO -#define MBGL_UTIL_GEO +#pragma once #include #include @@ -216,5 +215,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/include/mbgl/util/image.hpp b/include/mbgl/util/image.hpp index a1c899d239..fbb0686a7b 100644 --- a/include/mbgl/util/image.hpp +++ b/include/mbgl/util/image.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_IMAGE -#define MBGL_UTIL_IMAGE +#pragma once #include #include @@ -49,5 +48,3 @@ PremultipliedImage decodeImage(const std::string&); std::string encodePNG(const PremultipliedImage&); } // namespace mbgl - -#endif diff --git a/include/mbgl/util/noncopyable.hpp b/include/mbgl/util/noncopyable.hpp index 1789a36de9..105a76a9a0 100644 --- a/include/mbgl/util/noncopyable.hpp +++ b/include/mbgl/util/noncopyable.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_NONCOPYABLE -#define MBGL_UTIL_NONCOPYABLE +#pragma once namespace mbgl { namespace util { @@ -20,5 +19,3 @@ typedef non_copyable_::noncopyable noncopyable; } // namespace util } // namespace mbgl - -#endif diff --git a/include/mbgl/util/optional.hpp b/include/mbgl/util/optional.hpp index 1063ba84a1..a9374a1b53 100644 --- a/include/mbgl/util/optional.hpp +++ b/include/mbgl/util/optional.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_OPTIONAL -#define MBGL_UTIL_OPTIONAL +#pragma once #include @@ -9,5 +8,3 @@ template using optional = std::experimental::optional; } // namespace mbgl - -#endif diff --git a/include/mbgl/util/projection.hpp b/include/mbgl/util/projection.hpp index cc1c391962..8e1c994657 100644 --- a/include/mbgl/util/projection.hpp +++ b/include/mbgl/util/projection.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_PROJECTION -#define MBGL_UTIL_PROJECTION +#pragma once #include #include @@ -42,5 +41,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/include/mbgl/util/run_loop.hpp b/include/mbgl/util/run_loop.hpp index d3a61d4186..9703fe7bcb 100644 --- a/include/mbgl/util/run_loop.hpp +++ b/include/mbgl/util/run_loop.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_RUN_LOOP -#define MBGL_UTIL_RUN_LOOP +#pragma once #include #include @@ -182,5 +181,3 @@ private: } // namespace util } // namespace mbgl - -#endif diff --git a/include/mbgl/util/string.hpp b/include/mbgl/util/string.hpp index 5d3631e190..202554c3a7 100644 --- a/include/mbgl/util/string.hpp +++ b/include/mbgl/util/string.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_STRING -#define MBGL_UTIL_STRING +#pragma once #include #include @@ -53,5 +52,3 @@ inline std::string toString(std::exception_ptr error) { } // namespace util } // namespace mbgl - -#endif diff --git a/include/mbgl/util/timer.hpp b/include/mbgl/util/timer.hpp index 783241847d..7d76e3b79c 100644 --- a/include/mbgl/util/timer.hpp +++ b/include/mbgl/util/timer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_TIMER -#define MBGL_UTIL_TIMER +#pragma once #include #include @@ -25,5 +24,3 @@ private: } // namespace util } // namespace mbgl - -#endif diff --git a/include/mbgl/util/traits.hpp b/include/mbgl/util/traits.hpp index 812d9fb547..7c9499897e 100644 --- a/include/mbgl/util/traits.hpp +++ b/include/mbgl/util/traits.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_TRAITS -#define MBGL_UTIL_TRAITS +#pragma once #include @@ -11,5 +10,3 @@ constexpr auto underlying_type(T t) -> typename std::underlying_type::type { } } // namespace mbgl - -#endif // MBGL_UTIL_TRAITS diff --git a/include/mbgl/util/unitbezier.hpp b/include/mbgl/util/unitbezier.hpp index ce34534d5d..ce3e78f3cc 100644 --- a/include/mbgl/util/unitbezier.hpp +++ b/include/mbgl/util/unitbezier.hpp @@ -23,8 +23,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef MBGL_UTIL_UNITBEZIER -#define MBGL_UTIL_UNITBEZIER +#pragma once #include @@ -117,5 +116,3 @@ private: } // namespace util } // namespace mbgl - -#endif diff --git a/include/mbgl/util/util.hpp b/include/mbgl/util/util.hpp index 2b0fd9cdd5..df8613ab70 100644 --- a/include/mbgl/util/util.hpp +++ b/include/mbgl/util/util.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_UTIL -#define MBGL_UTIL_UTIL +#pragma once #ifdef DEBUG @@ -13,5 +12,3 @@ #define MBGL_VERIFY_THREAD(tid) #endif - -#endif diff --git a/include/mbgl/util/work_request.hpp b/include/mbgl/util/work_request.hpp index f24e4b2e9f..5b051fc09f 100644 --- a/include/mbgl/util/work_request.hpp +++ b/include/mbgl/util/work_request.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_WORK_REQUEST -#define MBGL_UTIL_WORK_REQUEST +#pragma once #include @@ -20,5 +19,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/include/mbgl/util/work_task.hpp b/include/mbgl/util/work_task.hpp index a874625c81..43f4810b43 100644 --- a/include/mbgl/util/work_task.hpp +++ b/include/mbgl/util/work_task.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_WORK_TASK -#define MBGL_UTIL_WORK_TASK +#pragma once #include @@ -17,5 +16,3 @@ public: }; } // namespace mbgl - -#endif -- cgit v1.2.1