From 4014aa6721e53318e4ac92814776b3e01b4589cb Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Tue, 11 Jul 2017 19:19:04 +0300 Subject: [core] GCC 4.9 bracket initialization issues --- src/mbgl/annotation/fill_annotation_impl.cpp | 2 +- src/mbgl/annotation/line_annotation_impl.cpp | 2 +- src/mbgl/gl/uniform.hpp | 4 +++- src/mbgl/map/map.cpp | 2 +- src/mbgl/renderer/sources/render_image_source.cpp | 4 ++-- src/mbgl/renderer/sources/render_raster_source.cpp | 4 ++-- 6 files changed, 10 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/mbgl/annotation/fill_annotation_impl.cpp b/src/mbgl/annotation/fill_annotation_impl.cpp index 5dc36edab0..9c73aeb796 100644 --- a/src/mbgl/annotation/fill_annotation_impl.cpp +++ b/src/mbgl/annotation/fill_annotation_impl.cpp @@ -9,7 +9,7 @@ using namespace style; FillAnnotationImpl::FillAnnotationImpl(AnnotationID id_, FillAnnotation annotation_, uint8_t maxZoom_) : ShapeAnnotationImpl(id_, maxZoom_), - annotation({ ShapeAnnotationGeometry::visit(annotation_.geometry, CloseShapeAnnotation{}), annotation_.opacity, annotation_.color, annotation_.outlineColor }) { + annotation(ShapeAnnotationGeometry::visit(annotation_.geometry, CloseShapeAnnotation{}), annotation_.opacity, annotation_.color, annotation_.outlineColor) { } void FillAnnotationImpl::updateStyle(Style::Impl& style) const { diff --git a/src/mbgl/annotation/line_annotation_impl.cpp b/src/mbgl/annotation/line_annotation_impl.cpp index 8954ecfa58..d35b956888 100644 --- a/src/mbgl/annotation/line_annotation_impl.cpp +++ b/src/mbgl/annotation/line_annotation_impl.cpp @@ -9,7 +9,7 @@ using namespace style; LineAnnotationImpl::LineAnnotationImpl(AnnotationID id_, LineAnnotation annotation_, uint8_t maxZoom_) : ShapeAnnotationImpl(id_, maxZoom_), - annotation({ ShapeAnnotationGeometry::visit(annotation_.geometry, CloseShapeAnnotation{}), annotation_.opacity, annotation_.width, annotation_.color }) { + annotation(ShapeAnnotationGeometry::visit(annotation_.geometry, CloseShapeAnnotation{}), annotation_.opacity, annotation_.width, annotation_.color) { } void LineAnnotationImpl::updateStyle(Style::Impl& style) const { diff --git a/src/mbgl/gl/uniform.hpp b/src/mbgl/gl/uniform.hpp index 829192bcca..4ed2419764 100644 --- a/src/mbgl/gl/uniform.hpp +++ b/src/mbgl/gl/uniform.hpp @@ -48,6 +48,8 @@ public: class State { public: + State(UniformLocation location_) : location(std::move(location_)) {} + void operator=(const Value& value) { if (location >= 0 && (!current || *current != value.t)) { current = value.t; @@ -106,7 +108,7 @@ public: template static State loadNamedLocations(const Program& program) { - return State{ { program.uniformLocation(Us::name()) }... }; + return State(typename Us::State(program.uniformLocation(Us::name()))...); } static NamedLocations getNamedLocations(const State& state) { diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 565d39c515..26795f7814 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -111,7 +111,7 @@ Map::Map(Backend& backend, GLContextMode contextMode, ConstrainMode constrainMode, ViewportMode viewportMode, - const optional& programCacheDir) + optional programCacheDir) : impl(std::make_unique(*this, backend, pixelRatio, diff --git a/src/mbgl/renderer/sources/render_image_source.cpp b/src/mbgl/renderer/sources/render_image_source.cpp index f5068b9d7f..6a3cb33fec 100644 --- a/src/mbgl/renderer/sources/render_image_source.cpp +++ b/src/mbgl/renderer/sources/render_image_source.cpp @@ -60,11 +60,11 @@ RenderImageSource::queryRenderedFeatures(const ScreenLineString&, const TransformState&, const RenderStyle&, const RenderedQueryOptions&) const { - return {}; + return std::unordered_map>(); } std::vector RenderImageSource::querySourceFeatures(const SourceQueryOptions&) const { - return {}; + return std::vector(); } void RenderImageSource::update(Immutable baseImpl_, diff --git a/src/mbgl/renderer/sources/render_raster_source.cpp b/src/mbgl/renderer/sources/render_raster_source.cpp index 2006e31628..6bf9caa1b4 100644 --- a/src/mbgl/renderer/sources/render_raster_source.cpp +++ b/src/mbgl/renderer/sources/render_raster_source.cpp @@ -73,11 +73,11 @@ RenderRasterSource::queryRenderedFeatures(const ScreenLineString&, const TransformState&, const RenderStyle&, const RenderedQueryOptions&) const { - return {}; + return std::unordered_map>(); } std::vector RenderRasterSource::querySourceFeatures(const SourceQueryOptions&) const { - return {}; + return std::vector(); } void RenderRasterSource::onLowMemory() { -- cgit v1.2.1