summaryrefslogtreecommitdiff
path: root/include/mbgl/util
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-05-25 21:14:18 +0200
committerKonstantin Käfer <mail@kkaefer.com>2016-05-25 21:35:37 +0200
commite2bcea90fce8a1e05e517c615d21d845e955f53d (patch)
tree208da7ad0db235a13b5ae6d360279a624e46fb95 /include/mbgl/util
parent6368403f433cfbfed1547d4167a9836fa2942a97 (diff)
downloadqtlocation-mapboxgl-e2bcea90fce8a1e05e517c615d21d845e955f53d.tar.gz
[core] use #pragma once instead of ifdef include guards
Diffstat (limited to 'include/mbgl/util')
-rw-r--r--include/mbgl/util/chrono.hpp5
-rw-r--r--include/mbgl/util/constants.hpp5
-rw-r--r--include/mbgl/util/default_styles.hpp5
-rw-r--r--include/mbgl/util/enum.hpp5
-rw-r--r--include/mbgl/util/exception.hpp5
-rw-r--r--include/mbgl/util/geo.hpp5
-rw-r--r--include/mbgl/util/image.hpp5
-rw-r--r--include/mbgl/util/noncopyable.hpp5
-rw-r--r--include/mbgl/util/optional.hpp5
-rw-r--r--include/mbgl/util/projection.hpp5
-rw-r--r--include/mbgl/util/run_loop.hpp5
-rw-r--r--include/mbgl/util/string.hpp5
-rw-r--r--include/mbgl/util/timer.hpp5
-rw-r--r--include/mbgl/util/traits.hpp5
-rw-r--r--include/mbgl/util/unitbezier.hpp5
-rw-r--r--include/mbgl/util/util.hpp5
-rw-r--r--include/mbgl/util/work_request.hpp5
-rw-r--r--include/mbgl/util/work_task.hpp5
18 files changed, 18 insertions, 72 deletions
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