diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-05-25 21:14:18 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2016-05-25 21:35:37 +0200 |
commit | e2bcea90fce8a1e05e517c615d21d845e955f53d (patch) | |
tree | 208da7ad0db235a13b5ae6d360279a624e46fb95 | |
parent | 6368403f433cfbfed1547d4167a9836fa2942a97 (diff) | |
download | qtlocation-mapboxgl-e2bcea90fce8a1e05e517c615d21d845e955f53d.tar.gz |
[core] use #pragma once instead of ifdef include guards
206 files changed, 211 insertions, 829 deletions
diff --git a/include/mbgl/annotation/annotation.hpp b/include/mbgl/annotation/annotation.hpp index 00b2446e40..52916549c9 100644 --- a/include/mbgl/annotation/annotation.hpp +++ b/include/mbgl/annotation/annotation.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_ANNOTATION -#define MBGL_ANNOTATION +#pragma once #include <cstdint> #include <vector> @@ -10,5 +9,3 @@ using AnnotationID = uint32_t; using AnnotationIDs = std::vector<AnnotationID>; } // namespace mbgl - -#endif diff --git a/include/mbgl/annotation/point_annotation.hpp b/include/mbgl/annotation/point_annotation.hpp index 3dea9a3e3e..c9236c3c04 100644 --- a/include/mbgl/annotation/point_annotation.hpp +++ b/include/mbgl/annotation/point_annotation.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_ANNOTATION_POINT_ANNOTATION -#define MBGL_ANNOTATION_POINT_ANNOTATION +#pragma once #include <mbgl/util/geo.hpp> @@ -17,5 +16,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/include/mbgl/annotation/shape_annotation.hpp b/include/mbgl/annotation/shape_annotation.hpp index 4d8d35d9ca..6e3fe95dd4 100644 --- a/include/mbgl/annotation/shape_annotation.hpp +++ b/include/mbgl/annotation/shape_annotation.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_ANNOTATION_SHAPE_ANNOTATION -#define MBGL_ANNOTATION_SHAPE_ANNOTATION +#pragma once #include <mbgl/annotation/annotation.hpp> #include <mbgl/style/types.hpp> @@ -53,5 +52,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/include/mbgl/gl/gl.hpp b/include/mbgl/gl/gl.hpp index 5ef76cf1da..6d601d8a23 100644 --- a/include/mbgl/gl/gl.hpp +++ b/include/mbgl/gl/gl.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GL_GL -#define MBGL_GL_GL +#pragma once //#define GL_TRACK @@ -164,5 +163,3 @@ void mbx_glTexImage2D(GLenum target, GLenum type, const GLvoid * data); #endif - -#endif diff --git a/include/mbgl/gl/gl_helper.hpp b/include/mbgl/gl/gl_helper.hpp index 4f3990a434..893c73e0c3 100644 --- a/include/mbgl/gl/gl_helper.hpp +++ b/include/mbgl/gl/gl_helper.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GL_GL_HELPER -#define MBGL_GL_GL_HELPER +#pragma once namespace mbgl { namespace gl { @@ -19,5 +18,3 @@ private: } // namespace gl } // namespace mbgl - -#endif diff --git a/include/mbgl/gl/gl_values.hpp b/include/mbgl/gl/gl_values.hpp index b96cfe310e..4204ca8e13 100644 --- a/include/mbgl/gl/gl_values.hpp +++ b/include/mbgl/gl/gl_values.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GL_GL_VALUES -#define MBGL_GL_GL_VALUES +#pragma once #include <cstdint> #include <tuple> @@ -286,9 +285,7 @@ struct RasterPos { } }; -#endif +#endif // GL_ES_VERSION_2_0 } // namespace gl } // namespace mbgl - -#endif // MBGL_RENDERER_GL_CONFIG diff --git a/include/mbgl/map/camera.hpp b/include/mbgl/map/camera.hpp index 2e20a6386f..4520321655 100644 --- a/include/mbgl/map/camera.hpp +++ b/include/mbgl/map/camera.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_CAMERA -#define MBGL_MAP_CAMERA +#pragma once #include <mbgl/util/geo.hpp> #include <mbgl/util/chrono.hpp> @@ -76,5 +75,3 @@ struct AnimationOptions { }; } // namespace mbgl - -#endif /* MBGL_MAP_CAMERA */ diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp index 39f0c86959..f074a5ae54 100644 --- a/include/mbgl/map/map.hpp +++ b/include/mbgl/map/map.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_MAP -#define MBGL_MAP_MAP +#pragma once #include <mbgl/util/optional.hpp> #include <mbgl/util/chrono.hpp> @@ -186,5 +185,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/include/mbgl/map/mode.hpp b/include/mbgl/map/mode.hpp index d94cdc0eb5..074bc3f08e 100644 --- a/include/mbgl/map/mode.hpp +++ b/include/mbgl/map/mode.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_MODE -#define MBGL_MAP_MODE +#pragma once #include <cstdint> @@ -63,5 +62,3 @@ inline bool operator& (const MapDebugOptions& lhs, const MapDebugOptions& rhs) { } } // namespace mbgl - -#endif // MBGL_MAP_MODE diff --git a/include/mbgl/map/update.hpp b/include/mbgl/map/update.hpp index 4ad1b1d195..3915545bb0 100644 --- a/include/mbgl/map/update.hpp +++ b/include/mbgl/map/update.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_UPDATE -#define MBGL_MAP_UPDATE +#pragma once #include <mbgl/util/traits.hpp> @@ -31,5 +30,3 @@ inline bool operator& (const Update& lhs, const Update& rhs) { } } // namespace mbgl - -#endif // MBGL_MAP_UPDATE diff --git a/include/mbgl/map/view.hpp b/include/mbgl/map/view.hpp index c62cc32bfc..4431e2b33c 100644 --- a/include/mbgl/map/view.hpp +++ b/include/mbgl/map/view.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_VIEW -#define MBGL_MAP_VIEW +#pragma once #include <mbgl/map/change.hpp> #include <mbgl/util/chrono.hpp> @@ -61,5 +60,3 @@ protected: mbgl::Map *map = nullptr; }; } // namespace mbgl - -#endif diff --git a/include/mbgl/mbgl.hpp b/include/mbgl/mbgl.hpp index 90abd4e11e..5cfc9cb45f 100644 --- a/include/mbgl/mbgl.hpp +++ b/include/mbgl/mbgl.hpp @@ -1,7 +1,4 @@ -#ifndef MBGL_MAIN -#define MBGL_MAIN +#pragma once #include "map/map.hpp" #include "map/view.hpp" - -#endif diff --git a/include/mbgl/platform/darwin/settings_nsuserdefaults.hpp b/include/mbgl/platform/darwin/settings_nsuserdefaults.hpp index 6364f249dd..b0ca060b85 100644 --- a/include/mbgl/platform/darwin/settings_nsuserdefaults.hpp +++ b/include/mbgl/platform/darwin/settings_nsuserdefaults.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_COMMON_SETTINGS_NSUSERDEFAULTS -#define MBGL_COMMON_SETTINGS_NSUSERDEFAULTS +#pragma once #import <mbgl/ios/MGLTypes.h> @@ -26,5 +25,3 @@ public: }; } - -#endif diff --git a/include/mbgl/platform/default/glfw_view.hpp b/include/mbgl/platform/default/glfw_view.hpp index 80cf028f79..b5931e6262 100644 --- a/include/mbgl/platform/default/glfw_view.hpp +++ b/include/mbgl/platform/default/glfw_view.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_COMMON_GLFW_VIEW -#define MBGL_COMMON_GLFW_VIEW +#pragma once #include <mbgl/mbgl.hpp> #include <mbgl/util/run_loop.hpp> @@ -90,5 +89,3 @@ private: GLFWwindow *window = nullptr; bool dirty = false; }; - -#endif diff --git a/include/mbgl/platform/default/headless_display.hpp b/include/mbgl/platform/default/headless_display.hpp index 80a0c31af3..edcc905221 100644 --- a/include/mbgl/platform/default/headless_display.hpp +++ b/include/mbgl/platform/default/headless_display.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_COMMON_HEADLESS_DISPLAY -#define MBGL_COMMON_HEADLESS_DISPLAY +#pragma once #include <mbgl/platform/default/headless_view.hpp> @@ -21,5 +20,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/include/mbgl/platform/default/headless_view.hpp b/include/mbgl/platform/default/headless_view.hpp index 9fbbdfd206..d787eb1691 100644 --- a/include/mbgl/platform/default/headless_view.hpp +++ b/include/mbgl/platform/default/headless_view.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_COMMON_HEADLESS_VIEW -#define MBGL_COMMON_HEADLESS_VIEW +#pragma once #ifdef __APPLE__ #include <TargetConditionals.h> @@ -85,5 +84,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/include/mbgl/platform/default/settings_json.hpp b/include/mbgl/platform/default/settings_json.hpp index 707d05eb18..eb23b28bc8 100644 --- a/include/mbgl/platform/default/settings_json.hpp +++ b/include/mbgl/platform/default/settings_json.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_JSON_SETTINGS -#define MBGL_JSON_SETTINGS +#pragma once #include <mbgl/map/mode.hpp> @@ -23,5 +22,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/include/mbgl/platform/event.hpp b/include/mbgl/platform/event.hpp index 8e36508388..0b3b79df6b 100644 --- a/include/mbgl/platform/event.hpp +++ b/include/mbgl/platform/event.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_PLATFORM_EVENT -#define MBGL_PLATFORM_EVENT +#pragma once #include <mbgl/util/enum.hpp> @@ -88,5 +87,3 @@ constexpr EventPermutation disabledEventPermutations[] = { }; } // namespace mbgl - -#endif diff --git a/include/mbgl/platform/log.hpp b/include/mbgl/platform/log.hpp index cd072c37da..48b9e3dc70 100644 --- a/include/mbgl/platform/log.hpp +++ b/include/mbgl/platform/log.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_PLATFORM_LOG -#define MBGL_PLATFORM_LOG +#pragma once #include <mbgl/platform/event.hpp> @@ -79,5 +78,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/include/mbgl/platform/platform.hpp b/include/mbgl/platform/platform.hpp index de2585874b..59ba7f97f3 100644 --- a/include/mbgl/platform/platform.hpp +++ b/include/mbgl/platform/platform.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_PLATFORM_PLATFORM -#define MBGL_PLATFORM_PLATFORM +#pragma once #include <memory> #include <string> @@ -25,5 +24,3 @@ void showDebugImage(std::string name, const char *data, size_t width, size_t hei void showColorDebugImage(std::string name, const char *data, size_t logical_width, size_t logical_height, size_t width, size_t height); } // namespace platform } // namespace mbgl - -#endif diff --git a/include/mbgl/sprite/sprite_image.hpp b/include/mbgl/sprite/sprite_image.hpp index 4c375e58b9..7900b90b66 100644 --- a/include/mbgl/sprite/sprite_image.hpp +++ b/include/mbgl/sprite/sprite_image.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SPRITE_IMAGE -#define MBGL_SPRITE_IMAGE +#pragma once #include <mbgl/util/noncopyable.hpp> #include <mbgl/util/geo.hpp> @@ -28,5 +27,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/include/mbgl/storage/default_file_source.hpp b/include/mbgl/storage/default_file_source.hpp index 76d60fce70..e77befda1b 100644 --- a/include/mbgl/storage/default_file_source.hpp +++ b/include/mbgl/storage/default_file_source.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STORAGE_DEFAULT_FILE_SOURCE -#define MBGL_STORAGE_DEFAULT_FILE_SOURCE +#pragma once #include <mbgl/storage/file_source.hpp> #include <mbgl/storage/offline.hpp> @@ -111,5 +110,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/include/mbgl/storage/file_source.hpp b/include/mbgl/storage/file_source.hpp index e572776af2..88e0336187 100644 --- a/include/mbgl/storage/file_source.hpp +++ b/include/mbgl/storage/file_source.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STORAGE_FILE_SOURCE -#define MBGL_STORAGE_FILE_SOURCE +#pragma once #include <mbgl/storage/response.hpp> #include <mbgl/storage/resource.hpp> @@ -27,5 +26,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/include/mbgl/storage/network_status.hpp b/include/mbgl/storage/network_status.hpp index d5ea13e07e..d7f502a3b2 100644 --- a/include/mbgl/storage/network_status.hpp +++ b/include/mbgl/storage/network_status.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STORAGE_NETWORK_STATUS -#define MBGL_STORAGE_NETWORK_STATUS +#pragma once #include <atomic> #include <mutex> @@ -33,5 +32,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/include/mbgl/storage/online_file_source.hpp b/include/mbgl/storage/online_file_source.hpp index fd742a54c4..081beeeabc 100644 --- a/include/mbgl/storage/online_file_source.hpp +++ b/include/mbgl/storage/online_file_source.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STORAGE_ONLINE_FILE_SOURCE -#define MBGL_STORAGE_ONLINE_FILE_SOURCE +#pragma once #include <mbgl/storage/file_source.hpp> @@ -24,5 +23,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/include/mbgl/storage/resource.hpp b/include/mbgl/storage/resource.hpp index 01c2ee4e39..62ee549663 100644 --- a/include/mbgl/storage/resource.hpp +++ b/include/mbgl/storage/resource.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STORAGE_RESOURCE -#define MBGL_STORAGE_RESOURCE +#pragma once #include <mbgl/storage/response.hpp> #include <mbgl/util/optional.hpp> @@ -68,5 +67,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/include/mbgl/storage/response.hpp b/include/mbgl/storage/response.hpp index f140e42b02..83227573cf 100644 --- a/include/mbgl/storage/response.hpp +++ b/include/mbgl/storage/response.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STORAGE_RESPONSE -#define MBGL_STORAGE_RESPONSE +#pragma once #include <mbgl/util/chrono.hpp> #include <mbgl/util/optional.hpp> @@ -56,5 +55,3 @@ public: std::ostream& operator<<(std::ostream&, Response::Error::Reason); } // namespace mbgl - -#endif diff --git a/include/mbgl/style/property_transition.hpp b/include/mbgl/style/property_transition.hpp index fa837f11a3..b9a301feea 100644 --- a/include/mbgl/style/property_transition.hpp +++ b/include/mbgl/style/property_transition.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STYLE_PROPERTY_TRANSITION -#define MBGL_STYLE_PROPERTY_TRANSITION +#pragma once #include <mbgl/util/chrono.hpp> #include <mbgl/util/optional.hpp> @@ -16,5 +15,3 @@ public: }; } // namespace mbgl - -#endif // MBGL_STYLE_PROPERTY_TRANSITION diff --git a/include/mbgl/style/types.hpp b/include/mbgl/style/types.hpp index 9cad1071c4..9b03ab8a2d 100644 --- a/include/mbgl/style/types.hpp +++ b/include/mbgl/style/types.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STYLE_TYPES -#define MBGL_STYLE_TYPES +#pragma once #include <mbgl/util/enum.hpp> @@ -146,5 +145,3 @@ using CustomLayerDeinitializeFunction = void (*)(void* context); } // namespace mbgl -#endif - 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 <chrono> #include <string> @@ -42,5 +41,3 @@ constexpr std::chrono::duration<Rep, Period> abs(std::chrono::duration<Rep, Peri } // namespace util } // namespace mbgl - -#endif diff --git a/include/mbgl/util/constants.hpp b/include/mbgl/util/constants.hpp index 3517299df2..621fc1820e 100644 --- a/include/mbgl/util/constants.hpp +++ b/include/mbgl/util/constants.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_CONSTANTS -#define MBGL_UTIL_CONSTANTS +#pragma once #include <mbgl/util/chrono.hpp> @@ -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 <vector> #include <string> @@ -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 <iosfwd> #include <string> @@ -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 <stdexcept> @@ -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 <mbgl/math/wrap.hpp> #include <mbgl/util/constants.hpp> @@ -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 <string> #include <memory> @@ -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 <experimental/optional> @@ -9,5 +8,3 @@ template <typename T> using optional = std::experimental::optional<T>; } // 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 <mbgl/util/constants.hpp> #include <mbgl/util/geo.hpp> @@ -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 <mbgl/util/noncopyable.hpp> #include <mbgl/util/util.hpp> @@ -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 <string> #include <cassert> @@ -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 <mbgl/util/noncopyable.hpp> #include <mbgl/util/chrono.hpp> @@ -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 <type_traits> @@ -11,5 +10,3 @@ constexpr auto underlying_type(T t) -> typename std::underlying_type<T>::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 <cmath> @@ -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 <mbgl/util/async_request.hpp> @@ -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 <mbgl/util/noncopyable.hpp> @@ -17,5 +16,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/platform/android/src/jni.hpp b/platform/android/src/jni.hpp index c2f1f5481b..57f84f0ccc 100644 --- a/platform/android/src/jni.hpp +++ b/platform/android/src/jni.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_ANDROID_JNI -#define MBGL_ANDROID_JNI +#pragma once #include <string> @@ -26,5 +25,3 @@ extern void detach_jni_thread(JavaVM* vm, JNIEnv** env, bool detach); } } - -#endif diff --git a/platform/android/src/native_map_view.hpp b/platform/android/src/native_map_view.hpp index 5bae79ad9a..40cb012b0b 100755 --- a/platform/android/src/native_map_view.hpp +++ b/platform/android/src/native_map_view.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_ANDROID_NATIVE_MAP_VIEW -#define MBGL_ANDROID_NATIVE_MAP_VIEW +#pragma once #include <mbgl/map/map.hpp> #include <mbgl/map/view.hpp> @@ -98,5 +97,3 @@ private: }; } } - -#endif diff --git a/platform/default/mbgl/storage/offline_database.hpp b/platform/default/mbgl/storage/offline_database.hpp index 06c44c80be..1706c6ba5a 100644 --- a/platform/default/mbgl/storage/offline_database.hpp +++ b/platform/default/mbgl/storage/offline_database.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_OFFLINE_DATABASE -#define MBGL_OFFLINE_DATABASE +#pragma once #include <mbgl/storage/resource.hpp> #include <mbgl/storage/offline.hpp> @@ -111,5 +110,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/platform/ios/benchmark/locations.hpp b/platform/ios/benchmark/locations.hpp index 96f9c6025b..1ea65d6280 100644 --- a/platform/ios/benchmark/locations.hpp +++ b/platform/ios/benchmark/locations.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_BENCH_LOCATIONS -#define MBGL_BENCH_LOCATIONS +#pragma once #include <vector> #include <string> @@ -19,5 +18,3 @@ extern const std::vector<Location> locations; } } - -#endif
\ No newline at end of file diff --git a/scripts/build-shaders.py b/scripts/build-shaders.py index 4cfb3cb384..228ba65112 100755 --- a/scripts/build-shaders.py +++ b/scripts/build-shaders.py @@ -18,10 +18,9 @@ shader_name, shader_type, extension = os.path.basename(input_file).split('.') with open(input_file, "r") as f: data = f.read() -content = """// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED. +content = """#pragma once -#ifndef MBGL_SHADER_{NAME}_{TYPE} -#define MBGL_SHADER_{NAME}_{TYPE} +// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED. #include <mbgl/gl/gl.hpp> @@ -38,8 +37,6 @@ constexpr const char* {type} = R"MBGL_SHADER(#version 120\n{data})MBGL_SHADER"; }} // namespace {name} }} // namespace shaders }} // namespace mbgl - -#endif """.format( name = shader_name, NAME = shader_name.upper(), diff --git a/scripts/build-version.py b/scripts/build-version.py index 1a01f6cd2b..a39639007d 100755 --- a/scripts/build-version.py +++ b/scripts/build-version.py @@ -44,8 +44,7 @@ else: rev = DEFAULT_REV header = """// NOTE: DO NOT CHANGE THIS FILE. IT IS AUTOMATICALLY GENERATED. -#ifndef MBGL_UTIL_VERSION -#define MBGL_UTIL_VERSION +#pragma once #define MBGL_VERSION 0x{major:02x}{minor:02x}{patch:02x} #define MBGL_VERSION_STRING "{major}.{minor}.{patch}" @@ -62,10 +61,8 @@ extern const char *revision; extern const char *string; extern const unsigned int number; -}} -}} - -#endif +}} // namespace mbgl +}} // namespace version """.format( major = tag[0], minor = tag[1], diff --git a/src/mbgl/algorithm/covered_by_children.hpp b/src/mbgl/algorithm/covered_by_children.hpp index 766a67acac..ad2f1dd5dd 100644 --- a/src/mbgl/algorithm/covered_by_children.hpp +++ b/src/mbgl/algorithm/covered_by_children.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_ALGORITHM_COVERED_BY_CHILDREN -#define MBGL_ALGORITHM_COVERED_BY_CHILDREN +#pragma once #include <mbgl/tile/tile_id.hpp> @@ -30,5 +29,3 @@ bool coveredByChildren(const UnwrappedTileID& id, const Container& container) { } // namespace algorithm } // namespace mbgl - -#endif
\ No newline at end of file diff --git a/src/mbgl/algorithm/generate_clip_ids.hpp b/src/mbgl/algorithm/generate_clip_ids.hpp index 8b06354d47..0454c99524 100644 --- a/src/mbgl/algorithm/generate_clip_ids.hpp +++ b/src/mbgl/algorithm/generate_clip_ids.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_ALGORITHM_GENERATE_CLIP_IDS -#define MBGL_ALGORITHM_GENERATE_CLIP_IDS +#pragma once #include <mbgl/tile/tile_id.hpp> #include <mbgl/util/clip_id.hpp> @@ -34,5 +33,3 @@ public: } // namespace algorithm } // namespace mbgl - -#endif diff --git a/src/mbgl/algorithm/generate_clip_ids_impl.hpp b/src/mbgl/algorithm/generate_clip_ids_impl.hpp index 479061b6cb..ff8f8d3fdf 100644 --- a/src/mbgl/algorithm/generate_clip_ids_impl.hpp +++ b/src/mbgl/algorithm/generate_clip_ids_impl.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_ALGORITHM_GENERATE_CLIP_IDS_IMPL -#define MBGL_ALGORITHM_GENERATE_CLIP_IDS_IMPL +#pragma once #include <mbgl/algorithm/generate_clip_ids.hpp> #include <mbgl/util/math.hpp> @@ -77,5 +76,3 @@ void ClipIDGenerator::update(Renderables& renderables) { } // namespace algorithm } // namespace mbgl - -#endif diff --git a/src/mbgl/algorithm/update_renderables.hpp b/src/mbgl/algorithm/update_renderables.hpp index a1fa6b1e6c..898f9e68d3 100644 --- a/src/mbgl/algorithm/update_renderables.hpp +++ b/src/mbgl/algorithm/update_renderables.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_ALGORITHM_UPDATE_RENDERABLES -#define MBGL_ALGORITHM_UPDATE_RENDERABLES +#pragma once #include <cstdint> @@ -11,5 +10,3 @@ void updateRenderables(Layer& layer, const uint8_t z); } // namespace algorithm } // namespace mbgl - -#endif diff --git a/src/mbgl/algorithm/update_renderables_impl.hpp b/src/mbgl/algorithm/update_renderables_impl.hpp index d7221be21c..6ec944a85f 100644 --- a/src/mbgl/algorithm/update_renderables_impl.hpp +++ b/src/mbgl/algorithm/update_renderables_impl.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_ALGORITHM_UPDATE_RENDERABLES_IMPL -#define MBGL_ALGORITHM_UPDATE_RENDERABLES_IMPL +#pragma once #include <mbgl/algorithm/update_renderables.hpp> #include <mbgl/tile/tile_id.hpp> @@ -89,5 +88,3 @@ std::map<UnwrappedTileID, Renderable> updateRenderables(const DataTiles& dataTil } // namespace algorithm } // namespace mbgl - -#endif diff --git a/src/mbgl/annotation/annotation_manager.hpp b/src/mbgl/annotation/annotation_manager.hpp index 4563a4a959..aaa60278cf 100644 --- a/src/mbgl/annotation/annotation_manager.hpp +++ b/src/mbgl/annotation/annotation_manager.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_ANNOTATION_MANAGER -#define MBGL_ANNOTATION_MANAGER +#pragma once #include <mbgl/annotation/annotation.hpp> #include <mbgl/annotation/point_annotation_impl.hpp> @@ -61,5 +60,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/annotation/annotation_tile.hpp b/src/mbgl/annotation/annotation_tile.hpp index 0e3b19e075..5943eb11c9 100644 --- a/src/mbgl/annotation/annotation_tile.hpp +++ b/src/mbgl/annotation/annotation_tile.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_ANNOTATION_TILE -#define MBGL_ANNOTATION_TILE +#pragma once #include <mbgl/tile/geometry_tile.hpp> #include <mbgl/tile/tile_id.hpp> @@ -57,5 +56,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/annotation/point_annotation_impl.hpp b/src/mbgl/annotation/point_annotation_impl.hpp index cf341f1252..d8852fca9e 100644 --- a/src/mbgl/annotation/point_annotation_impl.hpp +++ b/src/mbgl/annotation/point_annotation_impl.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_POINT_ANNOTATION_IMPL -#define MBGL_POINT_ANNOTATION_IMPL +#pragma once #include <mbgl/annotation/annotation.hpp> #include <mbgl/annotation/point_annotation.hpp> @@ -68,5 +67,3 @@ struct indexable<std::shared_ptr<const mbgl::PointAnnotationImpl>> { } // end namespace index } // end namespace geometry } // end namespace boost - -#endif diff --git a/src/mbgl/annotation/shape_annotation_impl.hpp b/src/mbgl/annotation/shape_annotation_impl.hpp index d745dd1299..fb3ef2d893 100644 --- a/src/mbgl/annotation/shape_annotation_impl.hpp +++ b/src/mbgl/annotation/shape_annotation_impl.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SHAPE_ANNOTATION_IMPL -#define MBGL_SHAPE_ANNOTATION_IMPL +#pragma once #include <mapbox/geojsonvt.hpp> @@ -37,5 +36,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/geometry/anchor.hpp b/src/mbgl/geometry/anchor.hpp index 0dd252216a..9bc979343e 100644 --- a/src/mbgl/geometry/anchor.hpp +++ b/src/mbgl/geometry/anchor.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GEOMETRY_ANCHOR -#define MBGL_GEOMETRY_ANCHOR +#pragma once #include <mbgl/util/geometry.hpp> @@ -23,5 +22,3 @@ struct Anchor { typedef std::vector<Anchor> Anchors; } // namespace mbgl - -#endif diff --git a/src/mbgl/geometry/binpack.hpp b/src/mbgl/geometry/binpack.hpp index 706115a208..b715cbc2be 100644 --- a/src/mbgl/geometry/binpack.hpp +++ b/src/mbgl/geometry/binpack.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GEOMETRY_BINPACK -#define MBGL_GEOMETRY_BINPACK +#pragma once #include <mbgl/util/noncopyable.hpp> #include <mbgl/util/rect.hpp> @@ -100,5 +99,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/geometry/buffer.hpp b/src/mbgl/geometry/buffer.hpp index e205113267..e8e2788f51 100644 --- a/src/mbgl/geometry/buffer.hpp +++ b/src/mbgl/geometry/buffer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GEOMETRY_BUFFER -#define MBGL_GEOMETRY_BUFFER +#pragma once #include <mbgl/gl/gl.hpp> #include <mbgl/gl/gl_object_store.hpp> @@ -119,5 +118,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/geometry/circle_buffer.hpp b/src/mbgl/geometry/circle_buffer.hpp index 30e339bb61..2b188c4003 100644 --- a/src/mbgl/geometry/circle_buffer.hpp +++ b/src/mbgl/geometry/circle_buffer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GEOMETRY_CIRCLE_BUFFER -#define MBGL_GEOMETRY_CIRCLE_BUFFER +#pragma once #include <mbgl/geometry/buffer.hpp> @@ -23,5 +22,3 @@ public: }; } // namespace mbgl - -#endif // MBGL_GEOMETRY_CIRCLE_BUFFER diff --git a/src/mbgl/geometry/collision_box_buffer.hpp b/src/mbgl/geometry/collision_box_buffer.hpp index 44a0f164b8..b2756dd97a 100644 --- a/src/mbgl/geometry/collision_box_buffer.hpp +++ b/src/mbgl/geometry/collision_box_buffer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GEOMETRY_COLLISIONBOX_BUFFER -#define MBGL_GEOMETRY_COLLISIONBOX_BUFFER +#pragma once #include <mbgl/geometry/buffer.hpp> #include <array> @@ -19,5 +18,3 @@ public: } // namespace mbgl - -#endif diff --git a/src/mbgl/geometry/debug_font_buffer.hpp b/src/mbgl/geometry/debug_font_buffer.hpp index 904360ee84..f2debe97a4 100644 --- a/src/mbgl/geometry/debug_font_buffer.hpp +++ b/src/mbgl/geometry/debug_font_buffer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GEOMETRY_DEBUG_FONT_BUFFER -#define MBGL_GEOMETRY_DEBUG_FONT_BUFFER +#pragma once #include <mbgl/geometry/buffer.hpp> @@ -13,5 +12,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/geometry/elements_buffer.hpp b/src/mbgl/geometry/elements_buffer.hpp index ce716dfaf4..5fdff0c678 100644 --- a/src/mbgl/geometry/elements_buffer.hpp +++ b/src/mbgl/geometry/elements_buffer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GEOMETRY_TRIANGLE_ELEMENTS_BUFFER -#define MBGL_GEOMETRY_TRIANGLE_ELEMENTS_BUFFER +#pragma once #include <mbgl/geometry/buffer.hpp> #include <mbgl/geometry/vao.hpp> @@ -45,5 +44,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/geometry/feature_index.hpp b/src/mbgl/geometry/feature_index.hpp index a0afbb885a..0dcc154f02 100644 --- a/src/mbgl/geometry/feature_index.hpp +++ b/src/mbgl/geometry/feature_index.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GEOMETRY_FEATURE_INDEX -#define MBGL_GEOMETRY_FEATURE_INDEX +#pragma once #include <mbgl/tile/geometry_tile.hpp> #include <mbgl/util/grid_index.hpp> @@ -72,5 +71,3 @@ private: std::unordered_map<std::string, std::vector<std::string>> bucketLayerIDs; }; } - -#endif diff --git a/src/mbgl/geometry/fill_buffer.hpp b/src/mbgl/geometry/fill_buffer.hpp index 531dcf82fc..a180d9c5a2 100644 --- a/src/mbgl/geometry/fill_buffer.hpp +++ b/src/mbgl/geometry/fill_buffer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GEOMETRY_FILL_BUFFER -#define MBGL_GEOMETRY_FILL_BUFFER +#pragma once #include <mbgl/geometry/buffer.hpp> #include <vector> @@ -17,5 +16,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/geometry/glyph_atlas.hpp b/src/mbgl/geometry/glyph_atlas.hpp index df1446cd47..20ba5890ef 100644 --- a/src/mbgl/geometry/glyph_atlas.hpp +++ b/src/mbgl/geometry/glyph_atlas.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GEOMETRY_GLYPH_ATLAS -#define MBGL_GEOMETRY_GLYPH_ATLAS +#pragma once #include <mbgl/geometry/binpack.hpp> #include <mbgl/text/glyph_store.hpp> @@ -58,5 +57,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/geometry/icon_buffer.hpp b/src/mbgl/geometry/icon_buffer.hpp index d3c3999ee9..0116686265 100644 --- a/src/mbgl/geometry/icon_buffer.hpp +++ b/src/mbgl/geometry/icon_buffer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GEOMETRY_ICON_BUFFER -#define MBGL_GEOMETRY_ICON_BUFFER +#pragma once #include <mbgl/geometry/buffer.hpp> @@ -16,5 +15,3 @@ namespace mbgl { }; } // namespace mbgl - -#endif diff --git a/src/mbgl/geometry/line_atlas.hpp b/src/mbgl/geometry/line_atlas.hpp index e94b399457..15eb415414 100644 --- a/src/mbgl/geometry/line_atlas.hpp +++ b/src/mbgl/geometry/line_atlas.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GEOMETRY_LINE_ATLAS -#define MBGL_GEOMETRY_LINE_ATLAS +#pragma once #include <mbgl/gl/gl.hpp> #include <mbgl/gl/gl_object_store.hpp> @@ -42,5 +41,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/geometry/line_buffer.hpp b/src/mbgl/geometry/line_buffer.hpp index aa2dedbceb..5511b009ac 100644 --- a/src/mbgl/geometry/line_buffer.hpp +++ b/src/mbgl/geometry/line_buffer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GEOMETRY_LINE_BUFFER -#define MBGL_GEOMETRY_LINE_BUFFER +#pragma once #include <mbgl/geometry/buffer.hpp> @@ -36,5 +35,3 @@ public: } // namespace mbgl - -#endif diff --git a/src/mbgl/geometry/static_vertex_buffer.hpp b/src/mbgl/geometry/static_vertex_buffer.hpp index eaf05b44d3..79f6117cbc 100644 --- a/src/mbgl/geometry/static_vertex_buffer.hpp +++ b/src/mbgl/geometry/static_vertex_buffer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GEOMETRY_STATIC_VERTEX_BUFFER -#define MBGL_GEOMETRY_STATIC_VERTEX_BUFFER +#pragma once #include <mbgl/geometry/buffer.hpp> @@ -22,5 +21,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/geometry/text_buffer.hpp b/src/mbgl/geometry/text_buffer.hpp index 5a20d463ba..8d7859fde2 100644 --- a/src/mbgl/geometry/text_buffer.hpp +++ b/src/mbgl/geometry/text_buffer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GEOMETRY_TEXT_BUFFER -#define MBGL_GEOMETRY_TEXT_BUFFER +#pragma once #include <mbgl/geometry/buffer.hpp> #include <array> @@ -19,5 +18,3 @@ public: } // namespace mbgl - -#endif diff --git a/src/mbgl/geometry/vao.hpp b/src/mbgl/geometry/vao.hpp index dcb66dd41d..8e9e417c1c 100644 --- a/src/mbgl/geometry/vao.hpp +++ b/src/mbgl/geometry/vao.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GEOMETRY_VAO -#define MBGL_GEOMETRY_VAO +#pragma once #include <mbgl/shader/shader.hpp> #include <mbgl/gl/gl.hpp> @@ -69,5 +68,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/gl/debugging.hpp b/src/mbgl/gl/debugging.hpp index 5321858624..b51b5dafe2 100644 --- a/src/mbgl/gl/debugging.hpp +++ b/src/mbgl/gl/debugging.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GL_DEBUG_MESSAGES -#define MBGL_GL_DEBUG_MESSAGES +#pragma once #include <string> @@ -25,5 +24,3 @@ struct group { } // namespace debugging } // namespace gl } // namespace mbgl - -#endif diff --git a/src/mbgl/gl/gl_config.hpp b/src/mbgl/gl/gl_config.hpp index 62dfbcadc0..7b42c7829f 100644 --- a/src/mbgl/gl/gl_config.hpp +++ b/src/mbgl/gl/gl_config.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_GL_GL_CONFIG -#define MBGL_GL_GL_CONFIG +#pragma once #include <cstdint> #include <tuple> @@ -111,5 +110,3 @@ public: } // namespace gl } // namespace mbgl - -#endif // MBGL_RENDERER_GL_CONFIG diff --git a/src/mbgl/gl/gl_object_store.hpp b/src/mbgl/gl/gl_object_store.hpp index 832f1d09b3..b30abd3892 100644 --- a/src/mbgl/gl/gl_object_store.hpp +++ b/src/mbgl/gl/gl_object_store.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_UTIL_GL_OBJECT_STORE -#define MBGL_MAP_UTIL_GL_OBJECT_STORE +#pragma once #include <mbgl/gl/gl.hpp> #include <mbgl/util/noncopyable.hpp> @@ -137,5 +136,3 @@ public: } // namespace gl } // namespace mbgl - -#endif diff --git a/src/mbgl/gl/texture_pool.hpp b/src/mbgl/gl/texture_pool.hpp index 10f63bfac9..10894f146e 100644 --- a/src/mbgl/gl/texture_pool.hpp +++ b/src/mbgl/gl/texture_pool.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_TEXTUREPOOL -#define MBGL_UTIL_TEXTUREPOOL +#pragma once #include <mbgl/util/noncopyable.hpp> #include <mbgl/gl/gl.hpp> @@ -37,5 +36,3 @@ private: } // namespace gl } // namespace mbgl - -#endif diff --git a/src/mbgl/layer/background_layer.hpp b/src/mbgl/layer/background_layer.hpp index fb9f8b7140..39142a3bd3 100644 --- a/src/mbgl/layer/background_layer.hpp +++ b/src/mbgl/layer/background_layer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_BACKGROUND_LAYER -#define MBGL_BACKGROUND_LAYER +#pragma once #include <mbgl/style/style_layer.hpp> #include <mbgl/style/paint_property.hpp> @@ -35,5 +34,3 @@ inline bool StyleLayer::is<BackgroundLayer>() const { } } // namespace mbgl - -#endif diff --git a/src/mbgl/layer/circle_layer.hpp b/src/mbgl/layer/circle_layer.hpp index 6a6f4ed526..543bae8f19 100644 --- a/src/mbgl/layer/circle_layer.hpp +++ b/src/mbgl/layer/circle_layer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_CIRCLE_LAYER -#define MBGL_CIRCLE_LAYER +#pragma once #include <mbgl/style/style_layer.hpp> #include <mbgl/style/paint_property.hpp> @@ -45,5 +44,3 @@ inline bool StyleLayer::is<CircleLayer>() const { } } // namespace mbgl - -#endif diff --git a/src/mbgl/layer/custom_layer.hpp b/src/mbgl/layer/custom_layer.hpp index b54ac7481e..93d9c85e6c 100644 --- a/src/mbgl/layer/custom_layer.hpp +++ b/src/mbgl/layer/custom_layer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_CUSTOM_LAYER -#define MBGL_CUSTOM_LAYER +#pragma once #include <mbgl/style/style_layer.hpp> @@ -44,5 +43,3 @@ inline bool StyleLayer::is<CustomLayer>() const { } } // namespace mbgl - -#endif diff --git a/src/mbgl/layer/fill_layer.hpp b/src/mbgl/layer/fill_layer.hpp index 880cbe14ae..eb8a507239 100644 --- a/src/mbgl/layer/fill_layer.hpp +++ b/src/mbgl/layer/fill_layer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_FILL_LAYER -#define MBGL_FILL_LAYER +#pragma once #include <mbgl/style/style_layer.hpp> #include <mbgl/style/paint_property.hpp> @@ -46,5 +45,3 @@ inline bool StyleLayer::is<FillLayer>() const { } } // namespace mbgl - -#endif diff --git a/src/mbgl/layer/line_layer.hpp b/src/mbgl/layer/line_layer.hpp index 00c8805e5f..60bd9fad55 100644 --- a/src/mbgl/layer/line_layer.hpp +++ b/src/mbgl/layer/line_layer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_LINE_LAYER -#define MBGL_LINE_LAYER +#pragma once #include <mbgl/style/style_layer.hpp> #include <mbgl/style/layout_property.hpp> @@ -63,5 +62,3 @@ inline bool StyleLayer::is<LineLayer>() const { } } // namespace mbgl - -#endif diff --git a/src/mbgl/layer/raster_layer.hpp b/src/mbgl/layer/raster_layer.hpp index 1acf8f5685..d473505d56 100644 --- a/src/mbgl/layer/raster_layer.hpp +++ b/src/mbgl/layer/raster_layer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_RASTER_LAYER -#define MBGL_RASTER_LAYER +#pragma once #include <mbgl/style/style_layer.hpp> #include <mbgl/style/paint_property.hpp> @@ -39,5 +38,3 @@ inline bool StyleLayer::is<RasterLayer>() const { } } // namespace mbgl - -#endif diff --git a/src/mbgl/layer/symbol_layer.hpp b/src/mbgl/layer/symbol_layer.hpp index f8e42ab821..3119ee1f03 100644 --- a/src/mbgl/layer/symbol_layer.hpp +++ b/src/mbgl/layer/symbol_layer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SYMBOL_LAYER -#define MBGL_SYMBOL_LAYER +#pragma once #include <mbgl/style/style_layer.hpp> #include <mbgl/style/layout_property.hpp> @@ -93,5 +92,3 @@ inline bool StyleLayer::is<SymbolLayer>() const { } } // namespace mbgl - -#endif diff --git a/src/mbgl/map/change.hpp b/src/mbgl/map/change.hpp index 01adc497d3..483ce82893 100644 --- a/src/mbgl/map/change.hpp +++ b/src/mbgl/map/change.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_CHANGE -#define MBGL_MAP_CHANGE +#pragma once #include <cstdint> @@ -23,5 +22,3 @@ enum MapChange : uint8_t { }; } // namespace mbgl - -#endif diff --git a/src/mbgl/map/transform.hpp b/src/mbgl/map/transform.hpp index 8752af9b41..904ed11392 100644 --- a/src/mbgl/map/transform.hpp +++ b/src/mbgl/map/transform.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_TRANSFORM -#define MBGL_MAP_TRANSFORM +#pragma once #include <mbgl/map/camera.hpp> #include <mbgl/map/mode.hpp> @@ -180,5 +179,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/map/transform_state.hpp b/src/mbgl/map/transform_state.hpp index 438094a4c5..0489b69dd4 100644 --- a/src/mbgl/map/transform_state.hpp +++ b/src/mbgl/map/transform_state.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_TRANSFORM_STATE -#define MBGL_MAP_TRANSFORM_STATE +#pragma once #include <mbgl/map/mode.hpp> #include <mbgl/util/geo.hpp> @@ -122,5 +121,3 @@ private: }; } // namespace mbgl - -#endif // MBGL_MAP_TRANSFORM_STATE diff --git a/src/mbgl/renderer/bucket.hpp b/src/mbgl/renderer/bucket.hpp index 0a4853ad9e..d7286b0b45 100644 --- a/src/mbgl/renderer/bucket.hpp +++ b/src/mbgl/renderer/bucket.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_RENDERER_BUCKET -#define MBGL_RENDERER_BUCKET +#pragma once #include <mbgl/gl/gl.hpp> #include <mbgl/renderer/render_pass.hpp> @@ -53,5 +52,3 @@ protected: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/renderer/circle_bucket.hpp b/src/mbgl/renderer/circle_bucket.hpp index abfca851ef..681334f8a4 100644 --- a/src/mbgl/renderer/circle_bucket.hpp +++ b/src/mbgl/renderer/circle_bucket.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_RENDERER_CIRCLE_BUCKET -#define MBGL_RENDERER_CIRCLE_BUCKET +#pragma once #include <mbgl/renderer/bucket.hpp> #include <mbgl/map/mode.hpp> @@ -38,5 +37,3 @@ private: }; } // namespace mbgl - -#endif // MBGL_RENDERER_CIRCLE_BUCKET diff --git a/src/mbgl/renderer/debug_bucket.hpp b/src/mbgl/renderer/debug_bucket.hpp index f26b7b79ec..a5262ab1bf 100644 --- a/src/mbgl/renderer/debug_bucket.hpp +++ b/src/mbgl/renderer/debug_bucket.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_RENDERER_DEBUGBUCKET -#define MBGL_RENDERER_DEBUGBUCKET +#pragma once #include <mbgl/tile/tile_data.hpp> #include <mbgl/map/mode.hpp> @@ -36,5 +35,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/renderer/fill_bucket.hpp b/src/mbgl/renderer/fill_bucket.hpp index aefb178c47..e8ef8cc67d 100644 --- a/src/mbgl/renderer/fill_bucket.hpp +++ b/src/mbgl/renderer/fill_bucket.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_RENDERER_FILLBUCKET -#define MBGL_RENDERER_FILLBUCKET +#pragma once #include <mbgl/renderer/bucket.hpp> #include <mbgl/tile/geometry_tile.hpp> @@ -67,5 +66,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/renderer/frame_history.hpp b/src/mbgl/renderer/frame_history.hpp index 88c58d74a0..c523a8531f 100644 --- a/src/mbgl/renderer/frame_history.hpp +++ b/src/mbgl/renderer/frame_history.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_RENDERER_FRAME_HISTORY -#define MBGL_RENDERER_FRAME_HISTORY +#pragma once #include <array> @@ -36,5 +35,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/renderer/line_bucket.hpp b/src/mbgl/renderer/line_bucket.hpp index 87d95586ca..8c9e38fb30 100644 --- a/src/mbgl/renderer/line_bucket.hpp +++ b/src/mbgl/renderer/line_bucket.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_RENDERER_LINEBUCKET -#define MBGL_RENDERER_LINEBUCKET +#pragma once #include <mbgl/renderer/bucket.hpp> #include <mbgl/tile/geometry_tile.hpp> @@ -67,5 +66,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/renderer/painter.hpp b/src/mbgl/renderer/painter.hpp index 9b5ef75c50..ee069b0a48 100644 --- a/src/mbgl/renderer/painter.hpp +++ b/src/mbgl/renderer/painter.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_RENDERER_PAINTER -#define MBGL_RENDERER_PAINTER +#pragma once #include <mbgl/map/transform_state.hpp> @@ -242,5 +241,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/renderer/raster_bucket.hpp b/src/mbgl/renderer/raster_bucket.hpp index 6fe21f3e91..da503dee0c 100644 --- a/src/mbgl/renderer/raster_bucket.hpp +++ b/src/mbgl/renderer/raster_bucket.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_RENDERER_RASTERBUCKET -#define MBGL_RENDERER_RASTERBUCKET +#pragma once #include <mbgl/renderer/bucket.hpp> #include <mbgl/util/raster.hpp> @@ -27,5 +26,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/renderer/render_pass.hpp b/src/mbgl/renderer/render_pass.hpp index d3b60d0667..e31383b7cf 100644 --- a/src/mbgl/renderer/render_pass.hpp +++ b/src/mbgl/renderer/render_pass.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_RENDERER_RENDER_PASS -#define MBGL_RENDERER_RENDER_PASS +#pragma once #include <mbgl/util/traits.hpp> @@ -26,5 +25,3 @@ constexpr inline RenderPass operator&(RenderPass a, RenderPass b) { } } // namespace mbgl - -#endif diff --git a/src/mbgl/renderer/renderable.hpp b/src/mbgl/renderer/renderable.hpp index 3d46fbd0bf..27acfc4d0d 100644 --- a/src/mbgl/renderer/renderable.hpp +++ b/src/mbgl/renderer/renderable.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_RENDERER_RENDERABLE -#define MBGL_RENDERER_RENDERABLE +#pragma once #include <mbgl/util/clip_id.hpp> @@ -10,5 +9,3 @@ struct Renderable { }; } // namespace mbgl - -#endif diff --git a/src/mbgl/renderer/symbol_bucket.hpp b/src/mbgl/renderer/symbol_bucket.hpp index 8581a23574..520989ac3f 100644 --- a/src/mbgl/renderer/symbol_bucket.hpp +++ b/src/mbgl/renderer/symbol_bucket.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_RENDERER_SYMBOLBUCKET -#define MBGL_RENDERER_SYMBOLBUCKET +#pragma once #include <mbgl/renderer/bucket.hpp> #include <mbgl/tile/geometry_tile.hpp> @@ -157,5 +156,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/shader/box_shader.hpp b/src/mbgl/shader/box_shader.hpp index f3015b73a7..5867a4896d 100644 --- a/src/mbgl/shader/box_shader.hpp +++ b/src/mbgl/shader/box_shader.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SHADER_SHADER_BOX -#define MBGL_SHADER_SHADER_BOX +#pragma once #include <mbgl/shader/shader.hpp> #include <mbgl/shader/uniform.hpp> @@ -24,5 +23,3 @@ protected: }; } // namespace mbgl - -#endif // MBGL_SHADER_BOX_SHADER diff --git a/src/mbgl/shader/circle_shader.hpp b/src/mbgl/shader/circle_shader.hpp index a28bf3c6ae..6e3cbacc62 100644 --- a/src/mbgl/shader/circle_shader.hpp +++ b/src/mbgl/shader/circle_shader.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SHADER_CIRCLE_SHADER -#define MBGL_SHADER_CIRCLE_SHADER +#pragma once #include <mbgl/shader/shader.hpp> #include <mbgl/shader/uniform.hpp> @@ -20,5 +19,3 @@ public: }; } // namespace mbgl - -#endif // MBGL_SHADER_CIRCLE_SHADER diff --git a/src/mbgl/shader/dot_shader.hpp b/src/mbgl/shader/dot_shader.hpp index a015310a62..99cf2b92dd 100644 --- a/src/mbgl/shader/dot_shader.hpp +++ b/src/mbgl/shader/dot_shader.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SHADER_SHADER_DOT -#define MBGL_SHADER_SHADER_DOT +#pragma once #include <mbgl/shader/shader.hpp> #include <mbgl/shader/uniform.hpp> @@ -19,5 +18,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/shader/icon_shader.hpp b/src/mbgl/shader/icon_shader.hpp index a7dcfe7a7e..6e52f48aab 100644 --- a/src/mbgl/shader/icon_shader.hpp +++ b/src/mbgl/shader/icon_shader.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SHADER_SHADER_ICON -#define MBGL_SHADER_SHADER_ICON +#pragma once #include <mbgl/shader/shader.hpp> #include <mbgl/shader/uniform.hpp> @@ -29,5 +28,3 @@ protected: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/shader/line_shader.hpp b/src/mbgl/shader/line_shader.hpp index 1a9598f925..54bdee3f31 100644 --- a/src/mbgl/shader/line_shader.hpp +++ b/src/mbgl/shader/line_shader.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SHADER_SHADER_LINE -#define MBGL_SHADER_SHADER_LINE +#pragma once #include <mbgl/shader/shader.hpp> #include <mbgl/shader/uniform.hpp> @@ -28,5 +27,3 @@ private: } // namespace mbgl - -#endif diff --git a/src/mbgl/shader/linepattern_shader.hpp b/src/mbgl/shader/linepattern_shader.hpp index cbab2f9c4c..98280af971 100644 --- a/src/mbgl/shader/linepattern_shader.hpp +++ b/src/mbgl/shader/linepattern_shader.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SHADER_SHADER_LINEPATTERN -#define MBGL_SHADER_SHADER_LINEPATTERN +#pragma once #include <mbgl/shader/shader.hpp> #include <mbgl/shader/uniform.hpp> @@ -35,5 +34,3 @@ private: GLint a_data = -1; }; } // namespace mbgl - -#endif diff --git a/src/mbgl/shader/linesdf_shader.hpp b/src/mbgl/shader/linesdf_shader.hpp index 8ac0aa5793..ec271f1751 100644 --- a/src/mbgl/shader/linesdf_shader.hpp +++ b/src/mbgl/shader/linesdf_shader.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SHADER_SHADER_LINESDF -#define MBGL_SHADER_SHADER_LINESDF +#pragma once #include <mbgl/shader/shader.hpp> #include <mbgl/shader/uniform.hpp> @@ -35,5 +34,3 @@ private: } // namespace mbgl - -#endif diff --git a/src/mbgl/shader/outline_shader.hpp b/src/mbgl/shader/outline_shader.hpp index 800461bf06..8128dbca5b 100644 --- a/src/mbgl/shader/outline_shader.hpp +++ b/src/mbgl/shader/outline_shader.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SHADER_SHADER_OUTLINE -#define MBGL_SHADER_SHADER_OUTLINE +#pragma once #include <mbgl/shader/shader.hpp> #include <mbgl/shader/uniform.hpp> @@ -18,5 +17,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/shader/outlinepattern_shader.hpp b/src/mbgl/shader/outlinepattern_shader.hpp index eed3839fd3..c0fc5242d1 100644 --- a/src/mbgl/shader/outlinepattern_shader.hpp +++ b/src/mbgl/shader/outlinepattern_shader.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SHADER_SHADER_OUTLINEPATTERN -#define MBGL_SHADER_SHADER_OUTLINEPATTERN +#pragma once #include <mbgl/shader/shader.hpp> #include <mbgl/shader/uniform.hpp> @@ -28,5 +27,3 @@ public: }; } // namespace mbgl - -#endif
\ No newline at end of file diff --git a/src/mbgl/shader/pattern_shader.hpp b/src/mbgl/shader/pattern_shader.hpp index 0898dc0b8c..b0d075247e 100644 --- a/src/mbgl/shader/pattern_shader.hpp +++ b/src/mbgl/shader/pattern_shader.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SHADER_SHADER_PATTERN -#define MBGL_SHADER_SHADER_PATTERN +#pragma once #include <mbgl/shader/shader.hpp> #include <mbgl/shader/uniform.hpp> @@ -27,5 +26,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/shader/plain_shader.hpp b/src/mbgl/shader/plain_shader.hpp index 34ee4dcdf7..5aecde9b49 100644 --- a/src/mbgl/shader/plain_shader.hpp +++ b/src/mbgl/shader/plain_shader.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SHADER_SHADER_PLAIN -#define MBGL_SHADER_SHADER_PLAIN +#pragma once #include <mbgl/shader/shader.hpp> #include <mbgl/shader/uniform.hpp> @@ -17,5 +16,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/shader/raster_shader.hpp b/src/mbgl/shader/raster_shader.hpp index 6a2e2ecf3e..0e445d5cc2 100644 --- a/src/mbgl/shader/raster_shader.hpp +++ b/src/mbgl/shader/raster_shader.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_RENDERER_SHADER_RASTER -#define MBGL_RENDERER_SHADER_RASTER +#pragma once #include <mbgl/shader/shader.hpp> #include <mbgl/shader/uniform.hpp> @@ -24,5 +23,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/shader/sdf_shader.hpp b/src/mbgl/shader/sdf_shader.hpp index 5fe6a44370..a33ee5e4d4 100644 --- a/src/mbgl/shader/sdf_shader.hpp +++ b/src/mbgl/shader/sdf_shader.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SHADER_SDF_SHADER -#define MBGL_SHADER_SDF_SHADER +#pragma once #include <mbgl/shader/shader.hpp> #include <mbgl/shader/uniform.hpp> @@ -40,5 +39,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/shader/shader.hpp b/src/mbgl/shader/shader.hpp index b543f73a6f..fd000e9cdd 100644 --- a/src/mbgl/shader/shader.hpp +++ b/src/mbgl/shader/shader.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_RENDERER_SHADER -#define MBGL_RENDERER_SHADER +#pragma once #include <mbgl/gl/gl.hpp> #include <mbgl/gl/gl_object_store.hpp> @@ -32,5 +31,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/shader/uniform.hpp b/src/mbgl/shader/uniform.hpp index 5c4a2b14c4..fd7e8797be 100644 --- a/src/mbgl/shader/uniform.hpp +++ b/src/mbgl/shader/uniform.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SHADER_UNIFORM -#define MBGL_SHADER_UNIFORM +#pragma once #include <mbgl/shader/shader.hpp> #include <mbgl/gl/gl.hpp> @@ -59,5 +58,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/source/source.hpp b/src/mbgl/source/source.hpp index 4da653d9a4..cbdf4afa15 100644 --- a/src/mbgl/source/source.hpp +++ b/src/mbgl/source/source.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_SOURCE -#define MBGL_MAP_SOURCE +#pragma once #include <mbgl/tile/tile_id.hpp> #include <mbgl/tile/tile_data.hpp> @@ -108,5 +107,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/source/source_info.hpp b/src/mbgl/source/source_info.hpp index ceae8ef8a3..dc79695dc9 100644 --- a/src/mbgl/source/source_info.hpp +++ b/src/mbgl/source/source_info.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_SOURCE_INFO -#define MBGL_MAP_SOURCE_INFO +#pragma once #include <mbgl/style/types.hpp> #include <mbgl/util/constants.hpp> @@ -26,5 +25,3 @@ public: }; } // namespace mbgl - -#endif // MBGL_MAP_SOURCE_INFO diff --git a/src/mbgl/source/source_observer.hpp b/src/mbgl/source/source_observer.hpp index 82d5a88729..828e562a3e 100644 --- a/src/mbgl/source/source_observer.hpp +++ b/src/mbgl/source/source_observer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_SOURCE_OBSERVER -#define MBGL_MAP_SOURCE_OBSERVER +#pragma once #include <exception> @@ -20,5 +19,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/sprite/sprite_atlas.hpp b/src/mbgl/sprite/sprite_atlas.hpp index ba592c5acb..891f48fa24 100644 --- a/src/mbgl/sprite/sprite_atlas.hpp +++ b/src/mbgl/sprite/sprite_atlas.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SPRITE_ATLAS -#define MBGL_SPRITE_ATLAS +#pragma once #include <mbgl/geometry/binpack.hpp> #include <mbgl/gl/gl.hpp> @@ -101,5 +100,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/sprite/sprite_parser.hpp b/src/mbgl/sprite/sprite_parser.hpp index 3244b6e4c8..6a564ce330 100644 --- a/src/mbgl/sprite/sprite_parser.hpp +++ b/src/mbgl/sprite/sprite_parser.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SPRITE_PARSER -#define MBGL_SPRITE_PARSER +#pragma once #include <mbgl/util/image.hpp> #include <mbgl/util/noncopyable.hpp> @@ -36,5 +35,3 @@ using SpriteParseResult = variant< SpriteParseResult parseSprite(const std::string& image, const std::string& json); } // namespace mbgl - -#endif diff --git a/src/mbgl/sprite/sprite_store.hpp b/src/mbgl/sprite/sprite_store.hpp index 50f74e174d..c6f34d6c5e 100644 --- a/src/mbgl/sprite/sprite_store.hpp +++ b/src/mbgl/sprite/sprite_store.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SPRITE_STORE -#define MBGL_SPRITE_STORE +#pragma once #include <mbgl/sprite/sprite_image.hpp> #include <mbgl/util/noncopyable.hpp> @@ -69,5 +68,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/sprite/sprite_store_observer.hpp b/src/mbgl/sprite/sprite_store_observer.hpp index 66d9d3790f..32ce040aa4 100644 --- a/src/mbgl/sprite/sprite_store_observer.hpp +++ b/src/mbgl/sprite/sprite_store_observer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_SPRITE_STORE_OBSERVER -#define MBGL_SPRITE_STORE_OBSERVER +#pragma once #include <exception> @@ -14,5 +13,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/storage/asset_file_source.hpp b/src/mbgl/storage/asset_file_source.hpp index f6c11c1768..71e5bbdab3 100644 --- a/src/mbgl/storage/asset_file_source.hpp +++ b/src/mbgl/storage/asset_file_source.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STORAGE_ASSET_FILE_SOURCE -#define MBGL_STORAGE_ASSET_FILE_SOURCE +#pragma once #include <mbgl/storage/file_source.hpp> @@ -22,5 +21,3 @@ private: }; } // namespace mbgl - -#endif // MBGL_STORAGE_ASSET_FILE_SOURCE diff --git a/src/mbgl/storage/http_file_source.hpp b/src/mbgl/storage/http_file_source.hpp index 60d37f1a14..47976f972e 100644 --- a/src/mbgl/storage/http_file_source.hpp +++ b/src/mbgl/storage/http_file_source.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STORAGE_HTTP_FILE_SOURCE -#define MBGL_STORAGE_HTTP_FILE_SOURCE +#pragma once #include <mbgl/storage/file_source.hpp> @@ -21,5 +20,3 @@ private: }; } // namespace mbgl - -#endif // MBGL_STORAGE_HTTP_FILE_SOURCE diff --git a/src/mbgl/style/class_dictionary.hpp b/src/mbgl/style/class_dictionary.hpp index 8a06a77c7a..703e27b438 100644 --- a/src/mbgl/style/class_dictionary.hpp +++ b/src/mbgl/style/class_dictionary.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STYLE_CLASS_DICTIONARY -#define MBGL_STYLE_CLASS_DICTIONARY +#pragma once #include <cstdint> #include <string> @@ -33,5 +32,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/style/function.hpp b/src/mbgl/style/function.hpp index c5de6b5db7..a04fc8bb4f 100644 --- a/src/mbgl/style/function.hpp +++ b/src/mbgl/style/function.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STYLE_FUNCTION -#define MBGL_STYLE_FUNCTION +#pragma once #include <vector> #include <utility> @@ -27,5 +26,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/style/function_evaluator.hpp b/src/mbgl/style/function_evaluator.hpp index 7da1c299e0..43549179df 100644 --- a/src/mbgl/style/function_evaluator.hpp +++ b/src/mbgl/style/function_evaluator.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STYLE_FUNCTION_EVALUATOR -#define MBGL_STYLE_FUNCTION_EVALUATOR +#pragma once #include <mbgl/style/function.hpp> #include <mbgl/util/interpolate.hpp> @@ -41,5 +40,3 @@ struct Interpolator<Faded<T>> } } // namespace mbgl - -#endif diff --git a/src/mbgl/style/layout_property.hpp b/src/mbgl/style/layout_property.hpp index dd3c032152..1df780be52 100644 --- a/src/mbgl/style/layout_property.hpp +++ b/src/mbgl/style/layout_property.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_LAYOUT_PROPERTY -#define MBGL_LAYOUT_PROPERTY +#pragma once #include <mbgl/style/property_parsing.hpp> #include <mbgl/style/function.hpp> @@ -36,5 +35,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/style/paint_property.hpp b/src/mbgl/style/paint_property.hpp index 3c2b4ba7d7..256f045d0d 100644 --- a/src/mbgl/style/paint_property.hpp +++ b/src/mbgl/style/paint_property.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_PAINT_PROPERTY -#define MBGL_PAINT_PROPERTY +#pragma once #include <mbgl/style/class_dictionary.hpp> #include <mbgl/style/property_parsing.hpp> @@ -144,5 +143,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/style/render_item.hpp b/src/mbgl/style/render_item.hpp index 6f15669654..a70c92f620 100644 --- a/src/mbgl/style/render_item.hpp +++ b/src/mbgl/style/render_item.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STYLE_RENDER_ITEM -#define MBGL_STYLE_RENDER_ITEM +#pragma once namespace mbgl { @@ -20,5 +19,3 @@ struct RenderItem { }; } // namespace mbgl - -#endif diff --git a/src/mbgl/style/style.hpp b/src/mbgl/style/style.hpp index 6a1af4cc9c..5fdd6cdc8e 100644 --- a/src/mbgl/style/style.hpp +++ b/src/mbgl/style/style.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STYLE_STYLE -#define MBGL_STYLE_STYLE +#pragma once #include <mbgl/style/render_item.hpp> #include <mbgl/style/zoom_history.hpp> @@ -137,5 +136,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/style/style_bucket_parameters.hpp b/src/mbgl/style/style_bucket_parameters.hpp index ce3fc6ac7e..ab63f8fe55 100644 --- a/src/mbgl/style/style_bucket_parameters.hpp +++ b/src/mbgl/style/style_bucket_parameters.hpp @@ -1,5 +1,4 @@ -#ifndef STYLE_BUCKET_PARAMETERS -#define STYLE_BUCKET_PARAMETERS +#pragma once #include <mbgl/map/mode.hpp> #include <mbgl/style/filter.hpp> @@ -60,5 +59,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/style/style_calculation_parameters.hpp b/src/mbgl/style/style_calculation_parameters.hpp index 00a578d4e7..1c50bd6128 100644 --- a/src/mbgl/style/style_calculation_parameters.hpp +++ b/src/mbgl/style/style_calculation_parameters.hpp @@ -1,5 +1,4 @@ -#ifndef STYLE_CALCULATION_PARAMETERS -#define STYLE_CALCULATION_PARAMETERS +#pragma once #include <mbgl/style/zoom_history.hpp> #include <mbgl/util/chrono.hpp> @@ -27,5 +26,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/style/style_cascade_parameters.hpp b/src/mbgl/style/style_cascade_parameters.hpp index bacf886b6f..569145bd04 100644 --- a/src/mbgl/style/style_cascade_parameters.hpp +++ b/src/mbgl/style/style_cascade_parameters.hpp @@ -1,5 +1,4 @@ -#ifndef STYLE_CASCADE_PARAMETERS -#define STYLE_CASCADE_PARAMETERS +#pragma once #include <mbgl/map/mode.hpp> #include <mbgl/util/chrono.hpp> @@ -19,5 +18,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/style/style_layer.hpp b/src/mbgl/style/style_layer.hpp index a568126e51..1388cbcb5a 100644 --- a/src/mbgl/style/style_layer.hpp +++ b/src/mbgl/style/style_layer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STYLE_STYLE_LAYER -#define MBGL_STYLE_STYLE_LAYER +#pragma once #include <mbgl/style/types.hpp> #include <mbgl/style/filter.hpp> @@ -101,5 +100,3 @@ protected: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/style/style_observer.hpp b/src/mbgl/style/style_observer.hpp index c725334c10..9e2c946f7d 100644 --- a/src/mbgl/style/style_observer.hpp +++ b/src/mbgl/style/style_observer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STYLE_STYLE_OBSERVER -#define MBGL_STYLE_STYLE_OBSERVER +#pragma once #include <mbgl/text/glyph_store_observer.hpp> #include <mbgl/sprite/sprite_store_observer.hpp> @@ -22,5 +21,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/style/style_parser.hpp b/src/mbgl/style/style_parser.hpp index 2c1feac15a..98481aec51 100644 --- a/src/mbgl/style/style_parser.hpp +++ b/src/mbgl/style/style_parser.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STYLE_STYLE_PARSER -#define MBGL_STYLE_STYLE_PARSER +#pragma once #include <mbgl/style/types.hpp> #include <mbgl/style/style_layer.hpp> @@ -54,5 +53,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/style/style_render_parameters.hpp b/src/mbgl/style/style_render_parameters.hpp index 16ce99177a..7347717a1d 100644 --- a/src/mbgl/style/style_render_parameters.hpp +++ b/src/mbgl/style/style_render_parameters.hpp @@ -1,5 +1,4 @@ -#ifndef STYLE_RENDER_PARAMETERS -#define STYLE_RENDER_PARAMETERS +#pragma once namespace mbgl { @@ -14,5 +13,3 @@ public: }; } - -#endif diff --git a/src/mbgl/style/style_update_parameters.hpp b/src/mbgl/style/style_update_parameters.hpp index e620f249f8..73ed500e8e 100644 --- a/src/mbgl/style/style_update_parameters.hpp +++ b/src/mbgl/style/style_update_parameters.hpp @@ -1,5 +1,4 @@ -#ifndef STYLE_UPDATE_PARAMETERS -#define STYLE_UPDATE_PARAMETERS +#pragma once #include <mbgl/map/mode.hpp> @@ -53,5 +52,3 @@ public: }; } - -#endif diff --git a/src/mbgl/style/zoom_history.hpp b/src/mbgl/style/zoom_history.hpp index 4e01af1fdd..8c88ea6507 100644 --- a/src/mbgl/style/zoom_history.hpp +++ b/src/mbgl/style/zoom_history.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_STYLE_ZOOM_HISTORY -#define MBGL_STYLE_ZOOM_HISTORY +#pragma once #include <mbgl/util/chrono.hpp> @@ -35,5 +34,3 @@ struct ZoomHistory { } }; } // namespace mbgl - -#endif diff --git a/src/mbgl/text/check_max_angle.hpp b/src/mbgl/text/check_max_angle.hpp index 0fb8a715a9..5e1ff6f049 100644 --- a/src/mbgl/text/check_max_angle.hpp +++ b/src/mbgl/text/check_max_angle.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TEXT_CHECK_MAX_ANGLE -#define MBGL_TEXT_CHECK_MAX_ANGLE +#pragma once #include <mbgl/tile/geometry_tile.hpp> @@ -11,5 +10,3 @@ bool checkMaxAngle(const GeometryCoordinates &line, Anchor &anchor, const float const float windowSize, const float maxAngle); } // namespace mbgl - -#endif diff --git a/src/mbgl/text/collision_feature.hpp b/src/mbgl/text/collision_feature.hpp index 840b37b943..0fcc083a19 100644 --- a/src/mbgl/text/collision_feature.hpp +++ b/src/mbgl/text/collision_feature.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TEXT_COLLISION_FEATURE -#define MBGL_TEXT_COLLISION_FEATURE +#pragma once #include <mbgl/geometry/anchor.hpp> #include <mbgl/text/shaping.hpp> @@ -63,5 +62,3 @@ namespace mbgl { const int segment, const float length, const float height); }; } // namespace mbgl - -#endif diff --git a/src/mbgl/text/collision_tile.hpp b/src/mbgl/text/collision_tile.hpp index 0be2dabdbf..7450fb1b86 100644 --- a/src/mbgl/text/collision_tile.hpp +++ b/src/mbgl/text/collision_tile.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TEXT_COLLISION_TILE -#define MBGL_TEXT_COLLISION_TILE +#pragma once #include <mbgl/text/collision_feature.hpp> #include <mbgl/text/placement_config.hpp> @@ -64,5 +63,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/text/get_anchors.hpp b/src/mbgl/text/get_anchors.hpp index 1f76685f9a..9a0a5a650c 100644 --- a/src/mbgl/text/get_anchors.hpp +++ b/src/mbgl/text/get_anchors.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TEXT_GETANCHORS -#define MBGL_TEXT_GETANCHORS +#pragma once #include <mbgl/geometry/anchor.hpp> #include <mbgl/tile/geometry_tile.hpp> @@ -12,5 +11,3 @@ Anchors getAnchors(const GeometryCoordinates &line, float spacing, const float iconLeft, const float iconRight, const float glyphSize, const float boxScale, const float overscaling); } // namespace mbgl - -#endif diff --git a/src/mbgl/text/glyph.hpp b/src/mbgl/text/glyph.hpp index e4984be868..b5891831d5 100644 --- a/src/mbgl/text/glyph.hpp +++ b/src/mbgl/text/glyph.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TEXT_GLYPH -#define MBGL_TEXT_GLYPH +#pragma once #include <mbgl/text/glyph_range.hpp> #include <mbgl/util/rect.hpp> @@ -81,5 +80,3 @@ public: }; } // end namespace mbgl - -#endif diff --git a/src/mbgl/text/glyph_pbf.hpp b/src/mbgl/text/glyph_pbf.hpp index 37e1b4dbd3..08616b268b 100644 --- a/src/mbgl/text/glyph_pbf.hpp +++ b/src/mbgl/text/glyph_pbf.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TEXT_GLYPH_PBF -#define MBGL_TEXT_GLYPH_PBF +#pragma once #include <mbgl/text/glyph.hpp> #include <mbgl/text/glyph_store.hpp> @@ -36,5 +35,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/text/glyph_range.hpp b/src/mbgl/text/glyph_range.hpp index 7a0c276df2..644046d7f8 100644 --- a/src/mbgl/text/glyph_range.hpp +++ b/src/mbgl/text/glyph_range.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TEXT_GLYPH_RANGE -#define MBGL_TEXT_GLYPH_RANGE +#pragma once #include <utility> #include <cstdint> @@ -9,5 +8,3 @@ namespace mbgl { typedef std::pair<uint16_t, uint16_t> GlyphRange; } // end namespace mbgl - -#endif diff --git a/src/mbgl/text/glyph_set.hpp b/src/mbgl/text/glyph_set.hpp index 40f87835fd..77e2cb1c95 100644 --- a/src/mbgl/text/glyph_set.hpp +++ b/src/mbgl/text/glyph_set.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TEXT_GLYPH_SET -#define MBGL_TEXT_GLYPH_SET +#pragma once #include <mbgl/text/glyph.hpp> #include <mbgl/util/geometry.hpp> @@ -21,5 +20,3 @@ private: }; } // end namespace mbgl - -#endif diff --git a/src/mbgl/text/glyph_store.hpp b/src/mbgl/text/glyph_store.hpp index 240da58b6e..d614a4947f 100644 --- a/src/mbgl/text/glyph_store.hpp +++ b/src/mbgl/text/glyph_store.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TEXT_GLYPH_STORE -#define MBGL_TEXT_GLYPH_STORE +#pragma once #include <mbgl/text/glyph.hpp> #include <mbgl/text/glyph_set.hpp> @@ -65,5 +64,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/text/glyph_store_observer.hpp b/src/mbgl/text/glyph_store_observer.hpp index 2ed1b2d5d9..89650892ea 100644 --- a/src/mbgl/text/glyph_store_observer.hpp +++ b/src/mbgl/text/glyph_store_observer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TEXT_GLYPH_STORE_OBSERVER -#define MBGL_TEXT_GLYPH_STORE_OBSERVER +#pragma once #include <mbgl/style/types.hpp> #include <mbgl/text/glyph_range.hpp> @@ -17,5 +16,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/text/placement_config.hpp b/src/mbgl/text/placement_config.hpp index 6680f52449..75345b89e8 100644 --- a/src/mbgl/text/placement_config.hpp +++ b/src/mbgl/text/placement_config.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TEXT_PLACEMENT_CONFIG -#define MBGL_TEXT_PLACEMENT_CONFIG +#pragma once namespace mbgl { @@ -24,5 +23,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/text/quads.hpp b/src/mbgl/text/quads.hpp index 03f86e1df9..c68ea2fe6a 100644 --- a/src/mbgl/text/quads.hpp +++ b/src/mbgl/text/quads.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TEXT_QUADS -#define MBGL_TEXT_QUADS +#pragma once #include <mbgl/text/glyph.hpp> #include <mbgl/tile/geometry_tile.hpp> @@ -44,5 +43,3 @@ namespace mbgl { const float boxScale, const GeometryCoordinates& line, const SymbolLayoutProperties& layout, const bool alongLine, const GlyphPositions& face); } // namespace mbgl - -#endif diff --git a/src/mbgl/text/shaping.hpp b/src/mbgl/text/shaping.hpp index 89249ee605..ea169b8dc6 100644 --- a/src/mbgl/text/shaping.hpp +++ b/src/mbgl/text/shaping.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TEXT_SHAPING -#define MBGL_TEXT_SHAPING +#pragma once #include <mbgl/text/glyph.hpp> #include <mbgl/sprite/sprite_atlas.hpp> @@ -31,5 +30,3 @@ namespace mbgl { PositionedIcon shapeIcon(const SpriteAtlasElement& image, const SymbolLayoutProperties&); } // namespace mbgl - -#endif diff --git a/src/mbgl/tile/geojson_tile.hpp b/src/mbgl/tile/geojson_tile.hpp index 6a490c39a2..04ecbc9a24 100644 --- a/src/mbgl/tile/geojson_tile.hpp +++ b/src/mbgl/tile/geojson_tile.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_ANNOTATION_GEOJSON_VT_TILE -#define MBGL_ANNOTATION_GEOJSON_VT_TILE +#pragma once #include <mbgl/tile/geometry_tile.hpp> #include <mbgl/tile/tile_id.hpp> @@ -74,5 +73,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/tile/geometry_tile.hpp b/src/mbgl/tile/geometry_tile.hpp index d98e1b3b0c..347d21e62c 100644 --- a/src/mbgl/tile/geometry_tile.hpp +++ b/src/mbgl/tile/geometry_tile.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_GEOMETRY_TILE -#define MBGL_MAP_GEOMETRY_TILE +#pragma once #include <mbgl/util/geometry.hpp> #include <mbgl/util/feature.hpp> @@ -96,5 +95,3 @@ std::vector<GeometryCollection> classifyRings(const GeometryCollection&); Feature convertFeature(const GeometryTileFeature&, const CanonicalTileID&); } // namespace mbgl - -#endif diff --git a/src/mbgl/tile/raster_tile_data.hpp b/src/mbgl/tile/raster_tile_data.hpp index af15bba948..46261b2b4d 100644 --- a/src/mbgl/tile/raster_tile_data.hpp +++ b/src/mbgl/tile/raster_tile_data.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_RASTER_TILE_DATA -#define MBGL_MAP_RASTER_TILE_DATA +#pragma once #include <mbgl/tile/tile_data.hpp> #include <mbgl/renderer/raster_bucket.hpp> @@ -35,5 +34,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/tile/tile.hpp b/src/mbgl/tile/tile.hpp index f66df9c748..1e35e78735 100644 --- a/src/mbgl/tile/tile.hpp +++ b/src/mbgl/tile/tile.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_TILE -#define MBGL_MAP_TILE +#pragma once #include <mbgl/tile/tile_id.hpp> #include <mbgl/util/mat4.hpp> @@ -27,5 +26,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/tile/tile_cache.hpp b/src/mbgl/tile/tile_cache.hpp index e63d8cee99..edaa6bd680 100644 --- a/src/mbgl/tile/tile_cache.hpp +++ b/src/mbgl/tile/tile_cache.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_TILE_CACHE -#define MBGL_MAP_TILE_CACHE +#pragma once #include <mbgl/tile/tile_id.hpp> @@ -30,5 +29,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/tile/tile_data.hpp b/src/mbgl/tile/tile_data.hpp index 738b872bf5..6552ad0f91 100644 --- a/src/mbgl/tile/tile_data.hpp +++ b/src/mbgl/tile/tile_data.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_TILE_DATA -#define MBGL_MAP_TILE_DATA +#pragma once #include <mbgl/util/noncopyable.hpp> #include <mbgl/util/chrono.hpp> @@ -117,5 +116,3 @@ protected: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/tile/tile_id.hpp b/src/mbgl/tile/tile_id.hpp index 8c86c0d09c..f9afdfa529 100644 --- a/src/mbgl/tile/tile_id.hpp +++ b/src/mbgl/tile/tile_id.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TILE_TILE_ID -#define MBGL_TILE_TILE_ID +#pragma once #include <mbgl/util/constants.hpp> @@ -266,5 +265,3 @@ inline float UnwrappedTileID::pixelsToTileUnits(const float pixelValue, const fl } } // namespace mbgl - -#endif diff --git a/src/mbgl/tile/tile_worker.hpp b/src/mbgl/tile/tile_worker.hpp index 7cb2536c90..91f3b04804 100644 --- a/src/mbgl/tile/tile_worker.hpp +++ b/src/mbgl/tile/tile_worker.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_TILE_WORKER -#define MBGL_MAP_TILE_WORKER +#pragma once #include <mbgl/map/mode.hpp> #include <mbgl/tile/tile_data.hpp> @@ -95,5 +94,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/tile/vector_tile.hpp b/src/mbgl/tile/vector_tile.hpp index d41d4f4f34..aed7b7ee03 100644 --- a/src/mbgl/tile/vector_tile.hpp +++ b/src/mbgl/tile/vector_tile.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_VECTOR_TILE -#define MBGL_MAP_VECTOR_TILE +#pragma once #include <mbgl/tile/geometry_tile.hpp> #include <mbgl/tile/tile_id.hpp> @@ -83,5 +82,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/tile/vector_tile_data.hpp b/src/mbgl/tile/vector_tile_data.hpp index c64d255a0a..d7f31bcab2 100644 --- a/src/mbgl/tile/vector_tile_data.hpp +++ b/src/mbgl/tile/vector_tile_data.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_MAP_VECTOR_TILE_DATA -#define MBGL_MAP_VECTOR_TILE_DATA +#pragma once #include <mbgl/tile/tile_data.hpp> #include <mbgl/tile/tile_worker.hpp> @@ -70,5 +69,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/util/assert.hpp b/src/mbgl/util/assert.hpp index 0c2f63f8fe..47fc13f94e 100644 --- a/src/mbgl/util/assert.hpp +++ b/src/mbgl/util/assert.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_ASSERT -#define MBGL_UTIL_ASSERT +#pragma once #include <cassert> @@ -9,5 +8,3 @@ ((void)((expr) ? ((void)0) : ((void)fprintf(stderr, "%s:%u: failed assertion `%s'\n", \ __FILE__, __LINE__, #expr), \ abort()))) - -#endif diff --git a/src/mbgl/util/async_task.hpp b/src/mbgl/util/async_task.hpp index ce273c664c..69746c3eb3 100644 --- a/src/mbgl/util/async_task.hpp +++ b/src/mbgl/util/async_task.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_ASYNC_TASK -#define MBGL_UTIL_ASYNC_TASK +#pragma once #include <mbgl/util/noncopyable.hpp> @@ -23,5 +22,3 @@ private: } // namespace util } // namespace mbgl - -#endif diff --git a/src/mbgl/util/channel.hpp b/src/mbgl/util/channel.hpp index a48156f120..319205b444 100644 --- a/src/mbgl/util/channel.hpp +++ b/src/mbgl/util/channel.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_CHANNEL -#define MBGL_UTIL_CHANNEL +#pragma once #include <mbgl/util/noncopyable.hpp> @@ -35,5 +34,3 @@ private: }; } - -#endif diff --git a/src/mbgl/util/clip_id.hpp b/src/mbgl/util/clip_id.hpp index dd580111cb..064a7acf94 100644 --- a/src/mbgl/util/clip_id.hpp +++ b/src/mbgl/util/clip_id.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_CLIP_IDS -#define MBGL_UTIL_CLIP_IDS +#pragma once #include <bitset> #include <string> @@ -35,5 +34,3 @@ struct ClipID { ::std::ostream& operator<<(::std::ostream& os, const ClipID& rhs); } // namespace mbgl - -#endif diff --git a/src/mbgl/util/clip_lines.hpp b/src/mbgl/util/clip_lines.hpp index a4a5c5fb8a..19ab3ac201 100644 --- a/src/mbgl/util/clip_lines.hpp +++ b/src/mbgl/util/clip_lines.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_CLIP_LINES -#define MBGL_UTIL_CLIP_LINES +#pragma once #include <map> #include <string> @@ -15,5 +14,3 @@ GeometryCollection clipLines(const GeometryCollection &lines, } // end namespace util } // end namespace mbgl - -#endif diff --git a/src/mbgl/util/compression.hpp b/src/mbgl/util/compression.hpp index 2e7a8bbc0c..8f89a3ac03 100644 --- a/src/mbgl/util/compression.hpp +++ b/src/mbgl/util/compression.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_COMPRESSION -#define MBGL_UTIL_COMPRESSION +#pragma once #include <string> @@ -11,5 +10,3 @@ std::string decompress(const std::string &raw); } // namespace util } // namespace mbgl - -#endif diff --git a/src/mbgl/util/dtoa.hpp b/src/mbgl/util/dtoa.hpp index 00c2c25ce2..17614732db 100644 --- a/src/mbgl/util/dtoa.hpp +++ b/src/mbgl/util/dtoa.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_DTOA -#define MBGL_UTIL_DTOA +#pragma once #include <string> @@ -18,5 +17,3 @@ inline std::string dtoa(double value) { } // end namespace util } // end namespace mbgl - -#endif diff --git a/src/mbgl/util/exclusive.hpp b/src/mbgl/util/exclusive.hpp index bb3395996b..946604af69 100644 --- a/src/mbgl/util/exclusive.hpp +++ b/src/mbgl/util/exclusive.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_EXCLUSIVE -#define MBGL_UTIL_EXCLUSIVE +#pragma once #include <memory> #include <mutex> @@ -26,5 +25,3 @@ private: } // end namespace util } // end namespace mbgl - -#endif diff --git a/src/mbgl/util/http_header.hpp b/src/mbgl/util/http_header.hpp index b5a6403782..8a83356977 100644 --- a/src/mbgl/util/http_header.hpp +++ b/src/mbgl/util/http_header.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_HTTP_HEADER -#define MBGL_UTIL_HTTP_HEADER +#pragma once #include <mbgl/util/optional.hpp> #include <mbgl/util/chrono.hpp> @@ -21,5 +20,3 @@ public: } // namespace http } // namespace mbgl - -#endif diff --git a/src/mbgl/util/intersection_tests.hpp b/src/mbgl/util/intersection_tests.hpp index a6e4308039..a3ffe65cbf 100644 --- a/src/mbgl/util/intersection_tests.hpp +++ b/src/mbgl/util/intersection_tests.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_INTERSECTION_TESTS -#define MBGL_UTIL_INTERSECTION_TESTS +#pragma once #include <mbgl/tile/geometry_tile.hpp> @@ -12,5 +11,3 @@ bool multiPolygonIntersectsMultiPolygon(const GeometryCollection&, const Geometr } } // namespace mbgl - -#endif diff --git a/src/mbgl/util/io.hpp b/src/mbgl/util/io.hpp index 1bcfe56af6..2679eb5360 100644 --- a/src/mbgl/util/io.hpp +++ b/src/mbgl/util/io.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_IO -#define MBGL_UTIL_IO +#pragma once #include <string> #include <stdexcept> @@ -20,5 +19,3 @@ void deleteFile(const std::string& filename); } // namespace util } // namespace mbgl - -#endif diff --git a/src/mbgl/util/mapbox.hpp b/src/mbgl/util/mapbox.hpp index 56c40df7ca..951cbc5a4b 100644 --- a/src/mbgl/util/mapbox.hpp +++ b/src/mbgl/util/mapbox.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_MAPBOX -#define MBGL_UTIL_MAPBOX +#pragma once #include <string> #include <mbgl/style/types.hpp> @@ -24,5 +23,3 @@ extern const uint64_t DEFAULT_OFFLINE_TILE_COUNT_LIMIT; } // namespace mapbox } // namespace util } // namespace mbgl - -#endif diff --git a/src/mbgl/util/mat2.hpp b/src/mbgl/util/mat2.hpp index c89088950d..6a25ef0f1e 100644 --- a/src/mbgl/util/mat2.hpp +++ b/src/mbgl/util/mat2.hpp @@ -20,8 +20,7 @@ // // 3. This notice may not be removed or altered from any source distribution. -#ifndef MBGL_UTIL_MAT2 -#define MBGL_UTIL_MAT2 +#pragma once #include <array> @@ -37,5 +36,3 @@ void scale(mat2& out, const mat2& a, double v0, double v1); } // namespace matrix } // namespace mbgl - -#endif diff --git a/src/mbgl/util/mat3.hpp b/src/mbgl/util/mat3.hpp index b0ecb17467..ca4955fe5f 100644 --- a/src/mbgl/util/mat3.hpp +++ b/src/mbgl/util/mat3.hpp @@ -20,8 +20,7 @@ // // 3. This notice may not be removed or altered from any source distribution. -#ifndef MBGL_UTIL_MAT3 -#define MBGL_UTIL_MAT3 +#pragma once #include <array> @@ -38,5 +37,3 @@ void scale(mat3& out, const mat3& a, double x, double y); } // namespace matrix } // namespace mbgl - -#endif diff --git a/src/mbgl/util/mat4.hpp b/src/mbgl/util/mat4.hpp index 80bd912554..2adeba8821 100644 --- a/src/mbgl/util/mat4.hpp +++ b/src/mbgl/util/mat4.hpp @@ -20,8 +20,7 @@ // // 3. This notice may not be removed or altered from any source distribution. -#ifndef MBGL_UTIL_MAT4 -#define MBGL_UTIL_MAT4 +#pragma once #include <array> @@ -48,5 +47,3 @@ void transformMat4(vec4& out, const vec4& a, const mat4& m); } // namespace matrix } // namespace mbgl - -#endif // MBGL_UTIL_MAT4 diff --git a/src/mbgl/util/math.hpp b/src/mbgl/util/math.hpp index f93743f211..ef60f76ffe 100644 --- a/src/mbgl/util/math.hpp +++ b/src/mbgl/util/math.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_MATH -#define MBGL_UTIL_MATH +#pragma once #include <cmath> #include <array> @@ -113,5 +112,3 @@ uint32_t ceil_log2(uint64_t x); } // namespace util } // namespace mbgl - -#endif diff --git a/src/mbgl/util/merge_lines.hpp b/src/mbgl/util/merge_lines.hpp index 55ad79036e..b1f216148d 100644 --- a/src/mbgl/util/merge_lines.hpp +++ b/src/mbgl/util/merge_lines.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_MERGELINES -#define MBGL_UTIL_MERGELINES +#pragma once #include <map> #include <string> @@ -25,5 +24,3 @@ void mergeLines(std::vector<SymbolFeature> &features); } // end namespace util } // end namespace mbgl - -#endif diff --git a/src/mbgl/util/premultiply.hpp b/src/mbgl/util/premultiply.hpp index f64f3f4555..532c7cb11d 100644 --- a/src/mbgl/util/premultiply.hpp +++ b/src/mbgl/util/premultiply.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_PREMULTIPLY -#define MBGL_UTIL_PREMULTIPLY +#pragma once #include <mbgl/util/image.hpp> @@ -11,5 +10,3 @@ UnassociatedImage unpremultiply(PremultipliedImage&&); } // namespace util } // namespace mbgl - -#endif diff --git a/src/mbgl/util/ptr.hpp b/src/mbgl/util/ptr.hpp index 7e8f8ecc18..2dc8118181 100644 --- a/src/mbgl/util/ptr.hpp +++ b/src/mbgl/util/ptr.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_PTR -#define MBGL_UTIL_PTR +#pragma once #include <memory> #include <cassert> @@ -25,5 +24,3 @@ public: }; } // namespace util } // namespace mbgl - -#endif
\ No newline at end of file diff --git a/src/mbgl/util/rapidjson.hpp b/src/mbgl/util/rapidjson.hpp index c9aad871d9..7262e8545c 100644 --- a/src/mbgl/util/rapidjson.hpp +++ b/src/mbgl/util/rapidjson.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_RAPIDJSON -#define MBGL_UTIL_RAPIDJSON +#pragma once #include <rapidjson/document.h> #include <rapidjson/error/en.h> @@ -10,5 +9,3 @@ using JSDocument = rapidjson::GenericDocument<rapidjson::UTF8<>, rapidjson::CrtA using JSValue = rapidjson::GenericValue<rapidjson::UTF8<>, rapidjson::CrtAllocator>; } // namespace mbgl - -#endif diff --git a/src/mbgl/util/raster.hpp b/src/mbgl/util/raster.hpp index 0a275a197c..8eef8d6c75 100644 --- a/src/mbgl/util/raster.hpp +++ b/src/mbgl/util/raster.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_RASTER -#define MBGL_UTIL_RASTER +#pragma once #include <mbgl/gl/gl.hpp> #include <mbgl/gl/texture_pool.hpp> @@ -60,5 +59,3 @@ private: }; } // namespace mbgl - -#endif diff --git a/src/mbgl/util/rect.hpp b/src/mbgl/util/rect.hpp index 1dc8cb8af9..2b877db40d 100644 --- a/src/mbgl/util/rect.hpp +++ b/src/mbgl/util/rect.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_RECT -#define MBGL_UTIL_RECT +#pragma once namespace mbgl { @@ -23,5 +22,3 @@ struct Rect { inline bool hasArea() const { return w != 0 && h != 0; } }; } // namespace mbgl - -#endif diff --git a/src/mbgl/util/std.hpp b/src/mbgl/util/std.hpp index bab5c1494d..974e21329c 100644 --- a/src/mbgl/util/std.hpp +++ b/src/mbgl/util/std.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_STD -#define MBGL_UTIL_STD +#pragma once #include <memory> #include <type_traits> @@ -26,5 +25,3 @@ void erase_if(Container &container, Predicate pred) { } // namespace util } // namespace mbgl - -#endif diff --git a/src/mbgl/util/stopwatch.hpp b/src/mbgl/util/stopwatch.hpp index a79ad92617..23086b1747 100644 --- a/src/mbgl/util/stopwatch.hpp +++ b/src/mbgl/util/stopwatch.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_STOPWATCH -#define MBGL_UTIL_STOPWATCH +#pragma once #include <mbgl/platform/event.hpp> #include <mbgl/util/chrono.hpp> @@ -37,5 +36,3 @@ class stopwatch { #endif } // namespace util } // namespace mbgl - -#endif diff --git a/src/mbgl/util/thread.hpp b/src/mbgl/util/thread.hpp index d54d998ab4..9efd5ea92f 100644 --- a/src/mbgl/util/thread.hpp +++ b/src/mbgl/util/thread.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_THREAD -#define MBGL_UTIL_THREAD +#pragma once #include <future> #include <thread> @@ -140,5 +139,3 @@ Thread<Object>::~Thread() { } // namespace util } // namespace mbgl - -#endif diff --git a/src/mbgl/util/thread_context.hpp b/src/mbgl/util/thread_context.hpp index 9c00ef25cf..60b32b3b2a 100644 --- a/src/mbgl/util/thread_context.hpp +++ b/src/mbgl/util/thread_context.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_THREAD_CONTEXT -#define MBGL_UTIL_THREAD_CONTEXT +#pragma once #include <string> @@ -21,5 +20,3 @@ public: } // namespace util } // namespace mbgl - -#endif diff --git a/src/mbgl/util/thread_local.hpp b/src/mbgl/util/thread_local.hpp index 5405037358..c3364c5d42 100644 --- a/src/mbgl/util/thread_local.hpp +++ b/src/mbgl/util/thread_local.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_THREAD_LOCAL -#define MBGL_UTIL_THREAD_LOCAL +#pragma once #include <mbgl/util/noncopyable.hpp> @@ -55,5 +54,3 @@ private: } // namespace util } // namespace mbgl - -#endif diff --git a/src/mbgl/util/tile_cover.hpp b/src/mbgl/util/tile_cover.hpp index aab96c8436..2d32d8bf41 100644 --- a/src/mbgl/util/tile_cover.hpp +++ b/src/mbgl/util/tile_cover.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_TILE_COVER -#define MBGL_UTIL_TILE_COVER +#pragma once #include <mbgl/tile/tile_id.hpp> #include <mbgl/style/types.hpp> @@ -21,5 +20,3 @@ std::vector<UnwrappedTileID> tileCover(const LatLngBounds&, int32_t z); } // namespace util } // namespace mbgl - -#endif diff --git a/src/mbgl/util/token.hpp b/src/mbgl/util/token.hpp index 722b08f773..149661e47e 100644 --- a/src/mbgl/util/token.hpp +++ b/src/mbgl/util/token.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_TOKEN -#define MBGL_UTIL_TOKEN +#pragma once #include <map> #include <string> @@ -40,5 +39,3 @@ std::string replaceTokens(const std::string &source, const Lookup &lookup) { } // end namespace util } // end namespace mbgl - -#endif diff --git a/src/mbgl/util/transition.hpp b/src/mbgl/util/transition.hpp index a947a9ad18..8176c6895a 100644 --- a/src/mbgl/util/transition.hpp +++ b/src/mbgl/util/transition.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_TRANSITION -#define MBGL_UTIL_TRANSITION +#pragma once #include <mbgl/util/noncopyable.hpp> #include <mbgl/util/chrono.hpp> @@ -74,5 +73,3 @@ private: } // namespace util } // namespace mbgl - -#endif diff --git a/src/mbgl/util/url.hpp b/src/mbgl/util/url.hpp index 8baa94be1d..b9c66261df 100644 --- a/src/mbgl/util/url.hpp +++ b/src/mbgl/util/url.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_URL -#define MBGL_UTIL_URL +#pragma once #include <string> @@ -12,5 +11,3 @@ std::string percentDecode(const std::string&); } // namespace util } // namespace mbgl - -#endif diff --git a/src/mbgl/util/utf.hpp b/src/mbgl/util/utf.hpp index 286036c094..02aabfc4c2 100644 --- a/src/mbgl/util/utf.hpp +++ b/src/mbgl/util/utf.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_UTF -#define MBGL_UTIL_UTF +#pragma once #include <memory> @@ -20,5 +19,3 @@ class utf8_to_utf32 { } // namespace mbgl } // namespace util - -#endif diff --git a/src/mbgl/util/variant.hpp b/src/mbgl/util/variant.hpp index cf8e578591..68a1208a17 100644 --- a/src/mbgl/util/variant.hpp +++ b/src/mbgl/util/variant.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_VARIANT -#define MBGL_UTIL_VARIANT +#pragma once #include <mapbox/variant.hpp> @@ -9,5 +8,3 @@ template <typename... T> using variant = mapbox::util::variant<T...>; } // namespace mbgl - -#endif diff --git a/src/mbgl/util/work_queue.hpp b/src/mbgl/util/work_queue.hpp index 788cfb4d2d..3f6328fb57 100644 --- a/src/mbgl/util/work_queue.hpp +++ b/src/mbgl/util/work_queue.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_WORK_QUEUE -#define MBGL_UTIL_WORK_QUEUE +#pragma once #include <mbgl/util/noncopyable.hpp> #include <mbgl/util/async_request.hpp> @@ -39,5 +38,3 @@ private: } // namespace util } // namespace mbgl - -#endif diff --git a/src/mbgl/util/worker.hpp b/src/mbgl/util/worker.hpp index ee237b6aeb..e07b8b8b44 100644 --- a/src/mbgl/util/worker.hpp +++ b/src/mbgl/util/worker.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_UTIL_WORKER -#define MBGL_UTIL_WORKER +#pragma once #include <mbgl/util/noncopyable.hpp> #include <mbgl/util/thread.hpp> @@ -61,5 +60,3 @@ private: std::size_t current = 0; }; } // namespace mbgl - -#endif diff --git a/test/algorithm/mock.hpp b/test/algorithm/mock.hpp index 89f51b15b8..0faddcac7e 100644 --- a/test/algorithm/mock.hpp +++ b/test/algorithm/mock.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TEST_MOCK -#define MBGL_TEST_MOCK +#pragma once #include <cstdint> #include <string> @@ -56,5 +55,3 @@ MockTileData* MockSource::createTileData(const mbgl::OverscaledTileID& tileID) { // Replace the existing MockTileData object, if any. return (dataTiles[tileID] = std::make_unique<MockTileData>()).get(); } - -#endif diff --git a/test/src/mbgl/test/fixture_log_observer.hpp b/test/src/mbgl/test/fixture_log_observer.hpp index f2ccb5cb58..1eabe10095 100644 --- a/test/src/mbgl/test/fixture_log_observer.hpp +++ b/test/src/mbgl/test/fixture_log_observer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TEST_FIXTURE_LOG_OBSERVER -#define MBGL_TEST_FIXTURE_LOG_OBSERVER +#pragma once #include <mbgl/platform/log.hpp> @@ -67,5 +66,3 @@ private: using FixtureLogObserver = FixtureLog::Observer; } // namespace mbgl - -#endif diff --git a/test/src/mbgl/test/stub_file_source.hpp b/test/src/mbgl/test/stub_file_source.hpp index 477f72ed42..b88fb59907 100644 --- a/test/src/mbgl/test/stub_file_source.hpp +++ b/test/src/mbgl/test/stub_file_source.hpp @@ -1,5 +1,4 @@ -#ifndef TEST_RESOURCES_STUB_FILE_SOURCE -#define TEST_RESOURCES_STUB_FILE_SOURCE +#pragma once #include <mbgl/storage/file_source.hpp> #include <mbgl/util/timer.hpp> @@ -40,6 +39,4 @@ private: util::Timer timer; }; -} - -#endif +} // namespace mbgl diff --git a/test/src/mbgl/test/stub_style_observer.hpp b/test/src/mbgl/test/stub_style_observer.hpp index a0d03de8a8..45af1edf9d 100644 --- a/test/src/mbgl/test/stub_style_observer.hpp +++ b/test/src/mbgl/test/stub_style_observer.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TEST_STUB_STYLE_OBSERVER -#define MBGL_TEST_STUB_STYLE_OBSERVER +#pragma once #include <mbgl/style/style_observer.hpp> @@ -64,5 +63,3 @@ public: }; } // namespace mbgl - -#endif diff --git a/test/src/mbgl/test/util.hpp b/test/src/mbgl/test/util.hpp index f778679cb8..76c00d8434 100644 --- a/test/src/mbgl/test/util.hpp +++ b/test/src/mbgl/test/util.hpp @@ -1,5 +1,4 @@ -#ifndef MBGL_TEST_UTIL -#define MBGL_TEST_UTIL +#pragma once #ifdef __APPLE__ #include <TargetConditionals.h> @@ -76,5 +75,3 @@ void checkImage(const std::string& base, } } - -#endif |