summaryrefslogtreecommitdiff
path: root/include/mbgl
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2017-07-19 18:01:32 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-07-19 19:24:30 +0300
commit5d4ed2706813cb9822d40763b76e867a577cbfdc (patch)
treecd11b090e338918ce13dcc4189fe6857d01ef72b /include/mbgl
parent15c5bf359a859ab6bc9492b3b735222ccc0dea97 (diff)
downloadqtlocation-mapboxgl-5d4ed2706813cb9822d40763b76e867a577cbfdc.tar.gz
[core] Bracket init works for optional<T> in GCC 4.9
Diffstat (limited to 'include/mbgl')
-rw-r--r--include/mbgl/renderer/query.hpp8
-rw-r--r--include/mbgl/renderer/renderer.hpp2
-rw-r--r--include/mbgl/style/transition_options.hpp4
3 files changed, 7 insertions, 7 deletions
diff --git a/include/mbgl/renderer/query.hpp b/include/mbgl/renderer/query.hpp
index b9d5f21a44..4cadf4f017 100644
--- a/include/mbgl/renderer/query.hpp
+++ b/include/mbgl/renderer/query.hpp
@@ -13,8 +13,8 @@ namespace mbgl {
*/
class RenderedQueryOptions {
public:
- RenderedQueryOptions(optional<std::vector<std::string>> layerIDs_ = optional<std::vector<std::string>>(),
- optional<style::Filter> filter_ = optional<style::Filter>())
+ RenderedQueryOptions(optional<std::vector<std::string>> layerIDs_ = {},
+ optional<style::Filter> filter_ = {})
: layerIDs(std::move(layerIDs_)),
filter(std::move(filter_)) {}
@@ -29,8 +29,8 @@ public:
*/
class SourceQueryOptions {
public:
- SourceQueryOptions(optional<std::vector<std::string>> sourceLayers_ = optional<std::vector<std::string>> (),
- optional<style::Filter> filter_ = optional<style::Filter>())
+ SourceQueryOptions(optional<std::vector<std::string>> sourceLayers_ = {},
+ optional<style::Filter> filter_ = {})
: sourceLayers(std::move(sourceLayers_)),
filter(std::move(filter_)) {}
diff --git a/include/mbgl/renderer/renderer.hpp b/include/mbgl/renderer/renderer.hpp
index c209e03045..083102acbe 100644
--- a/include/mbgl/renderer/renderer.hpp
+++ b/include/mbgl/renderer/renderer.hpp
@@ -26,7 +26,7 @@ class Renderer {
public:
Renderer(RendererBackend&, float pixelRatio_, FileSource&, Scheduler&,
GLContextMode = GLContextMode::Unique,
- const optional<std::string> programCacheDir = optional<std::string>());
+ const optional<std::string> programCacheDir = {});
~Renderer();
void setObserver(RendererObserver*);
diff --git a/include/mbgl/style/transition_options.hpp b/include/mbgl/style/transition_options.hpp
index 0ac7c02c6b..87a81717a0 100644
--- a/include/mbgl/style/transition_options.hpp
+++ b/include/mbgl/style/transition_options.hpp
@@ -11,8 +11,8 @@ public:
optional<Duration> duration;
optional<Duration> delay;
- TransitionOptions(optional<Duration> duration_ = optional<Duration>(),
- optional<Duration> delay_ = optional<Duration>())
+ TransitionOptions(optional<Duration> duration_ = {},
+ optional<Duration> delay_ = {})
: duration(std::move(duration_)),
delay(std::move(delay_)) {}