summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2017-05-10 18:52:46 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-05-12 18:07:36 +0300
commit24137c4812d9114fbcea280baf26e3fbbf57af5e (patch)
tree6cefebeb7baf08c24b65ed100c8eaa0e01e8a68c
parent25b2250c32c1881990718c7de7b87f33ab703e79 (diff)
downloadqtlocation-mapboxgl-24137c4812d9114fbcea280baf26e3fbbf57af5e.tar.gz
[tidy] modernize-use-default-member-init
-rw-r--r--src/mbgl/text/glyph.hpp10
-rw-r--r--test/src/mbgl/test/fixture_log_observer.cpp3
-rw-r--r--test/src/mbgl/test/fixture_log_observer.hpp10
3 files changed, 10 insertions, 13 deletions
diff --git a/src/mbgl/text/glyph.hpp b/src/mbgl/text/glyph.hpp
index 458cd688ad..7cfb9aa0d9 100644
--- a/src/mbgl/text/glyph.hpp
+++ b/src/mbgl/text/glyph.hpp
@@ -58,14 +58,14 @@ enum class WritingModeType : uint8_t;
class Shaping {
public:
- explicit Shaping() : top(0), bottom(0), left(0), right(0) {}
+ explicit Shaping() = default;
explicit Shaping(float x, float y, WritingModeType writingMode_)
: top(y), bottom(y), left(x), right(x), writingMode(writingMode_) {}
std::vector<PositionedGlyph> positionedGlyphs;
- int32_t top;
- int32_t bottom;
- int32_t left;
- int32_t right;
+ int32_t top = 0;
+ int32_t bottom = 0;
+ int32_t left = 0;
+ int32_t right = 0;
WritingModeType writingMode;
explicit operator bool() const { return !positionedGlyphs.empty(); }
diff --git a/test/src/mbgl/test/fixture_log_observer.cpp b/test/src/mbgl/test/fixture_log_observer.cpp
index fc0239bb1c..db257d73cf 100644
--- a/test/src/mbgl/test/fixture_log_observer.cpp
+++ b/test/src/mbgl/test/fixture_log_observer.cpp
@@ -15,9 +15,6 @@ bool FixtureLog::Message::operator==(const Message& rhs) const {
return severity == rhs.severity && event == rhs.event && code == rhs.code && msg == rhs.msg;
}
-FixtureLog::Message::Message() : severity(), event(), code(), msg() {
-}
-
FixtureLog::Observer::Observer(FixtureLog* log_) : log(log_) {
}
diff --git a/test/src/mbgl/test/fixture_log_observer.hpp b/test/src/mbgl/test/fixture_log_observer.hpp
index 96ddc2c54f..328d4753a8 100644
--- a/test/src/mbgl/test/fixture_log_observer.hpp
+++ b/test/src/mbgl/test/fixture_log_observer.hpp
@@ -12,15 +12,15 @@ namespace mbgl {
class FixtureLog {
public:
struct Message {
+ Message() = default;
Message(EventSeverity severity_, Event event_, int64_t code_, std::string msg_);
- Message();
bool operator==(const Message& rhs) const;
- const EventSeverity severity;
- const Event event;
- const int64_t code;
- const std::string msg;
+ const EventSeverity severity {};
+ const Event event {};
+ const int64_t code {};
+ const std::string msg {};
mutable bool checked = false;
};