diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2018-05-29 12:27:10 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2018-06-04 10:43:21 +0200 |
commit | 3ef67a827e6a322d943b793d962bcd9b76727e14 (patch) | |
tree | fad646672109e8d7acb926ecf25e6af219628255 | |
parent | d66251234d7c0feb875b9490ca945ee9d43306c1 (diff) | |
download | qtlocation-mapboxgl-3ef67a827e6a322d943b793d962bcd9b76727e14.tar.gz |
[core] fix bogus unused variable with GCC 7
-rw-r--r-- | src/mbgl/style/conversion/transition_options.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mbgl/style/conversion/transition_options.cpp b/src/mbgl/style/conversion/transition_options.cpp index 8a60c5bfd8..116d44f9d9 100644 --- a/src/mbgl/style/conversion/transition_options.cpp +++ b/src/mbgl/style/conversion/transition_options.cpp @@ -10,7 +10,7 @@ optional<TransitionOptions> Converter<TransitionOptions>::operator()(const Conve return {}; } - TransitionOptions result; + optional<TransitionOptions> result = TransitionOptions{}; auto duration = objectMember(value, "duration"); if (duration) { @@ -19,7 +19,7 @@ optional<TransitionOptions> Converter<TransitionOptions>::operator()(const Conve error = { "duration must be a number" }; return {}; } - result.duration = { std::chrono::milliseconds(int64_t(*number)) }; + result->duration = { std::chrono::milliseconds(int64_t(*number)) }; } auto delay = objectMember(value, "delay"); @@ -29,7 +29,7 @@ optional<TransitionOptions> Converter<TransitionOptions>::operator()(const Conve error = { "delay must be a number" }; return {}; } - result.delay = { std::chrono::milliseconds(int64_t(*number)) }; + result->delay = { std::chrono::milliseconds(int64_t(*number)) }; } return result; |