[core] use #pragma once instead of ifdef include guards
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
#ifndef MBGL_MAIN
|
||||
#define MBGL_MAIN
|
||||
#pragma once
|
||||
|
||||
#include "map/map.hpp"
|
||||
#include "map/view.hpp"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user