summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-10-22 16:29:10 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-10-22 16:29:10 +0200
commit7d6feffd56cde7d6e5d9dd53b358f5afa8e4eb47 (patch)
treebf152444305b89c25d73028cac813875c9e312bc /test
parent2422e938ac87f5790c4977d93e667c95e695f76c (diff)
downloadqtlocation-mapboxgl-7d6feffd56cde7d6e5d9dd53b358f5afa8e4eb47.tar.gz
replace boost optional with mapbox optional
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/fixture_log.hpp17
-rw-r--r--test/variant.cpp7
2 files changed, 8 insertions, 16 deletions
diff --git a/test/fixtures/fixture_log.hpp b/test/fixtures/fixture_log.hpp
index 263871575b..dc92f93198 100644
--- a/test/fixtures/fixture_log.hpp
+++ b/test/fixtures/fixture_log.hpp
@@ -3,8 +3,7 @@
#include <mbgl/platform/log.hpp>
#include <mbgl/util/noncopyable.hpp>
-
-#include <boost/optional.hpp>
+#include <mbgl/util/optional.hpp>
#include <vector>
#include <cstdarg>
@@ -17,11 +16,11 @@ public:
inline LogMessage(EventSeverity severity, Event event, int64_t code, const std::string &msg)
: severity(severity), event(event), code(code), msg(msg) {}
inline LogMessage(EventSeverity severity, Event event, int64_t code)
- : severity(severity), event(event), code(code) {}
+ : severity(severity), event(event), code(code), msg() {}
inline LogMessage(EventSeverity severity, Event event, const std::string &msg)
- : severity(severity), event(event), msg(msg) {}
+ : severity(severity), event(event), code(), msg(msg) {}
inline LogMessage(EventSeverity severity, Event event)
- : severity(severity), event(event) {}
+ : severity(severity), event(event), code(), msg() {}
inline bool operator==(const LogMessage &rhs) const {
return (!severity || !rhs.severity || severity.get() == rhs.severity.get()) &&
@@ -30,10 +29,10 @@ public:
(!msg || !rhs.msg || msg.get() == rhs.msg.get());
}
- const boost::optional<EventSeverity> severity;
- const boost::optional<Event> event;
- const boost::optional<int64_t> code;
- const boost::optional<std::string> msg;
+ const mapbox::util::optional<EventSeverity> severity;
+ const mapbox::util::optional<Event> event;
+ const mapbox::util::optional<int64_t> code;
+ const mapbox::util::optional<std::string> msg;
mutable bool checked = false;
};
diff --git a/test/variant.cpp b/test/variant.cpp
index dd4578b49d..4557465cfa 100644
--- a/test/variant.cpp
+++ b/test/variant.cpp
@@ -4,13 +4,6 @@
#include <mbgl/style/value.hpp>
#include <mbgl/style/value_comparison.hpp>
-#pragma GCC diagnostic push
-#ifndef __clang__
-#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
-#endif
-#include <boost/lexical_cast.hpp>
-#pragma GCC diagnostic pop
-
using namespace mbgl;
TEST(Variant, toString) {