[core] GCC 4.9 bracket initialization issues

This commit is contained in:
Bruno de Oliveira Abinader
2017-07-11 19:19:04 +03:00
parent 2fae373fc9
commit 4014aa6721
16 changed files with 93 additions and 65 deletions

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 <class Program>
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) {

View File

@@ -111,7 +111,7 @@ Map::Map(Backend& backend,
GLContextMode contextMode,
ConstrainMode constrainMode,
ViewportMode viewportMode,
const optional<std::string>& programCacheDir)
optional<std::string> programCacheDir)
: impl(std::make_unique<Impl>(*this,
backend,
pixelRatio,

View File

@@ -60,11 +60,11 @@ RenderImageSource::queryRenderedFeatures(const ScreenLineString&,
const TransformState&,
const RenderStyle&,
const RenderedQueryOptions&) const {
return {};
return std::unordered_map<std::string, std::vector<Feature>>();
}
std::vector<Feature> RenderImageSource::querySourceFeatures(const SourceQueryOptions&) const {
return {};
return std::vector<Feature>();
}
void RenderImageSource::update(Immutable<style::Source::Impl> baseImpl_,

View File

@@ -73,11 +73,11 @@ RenderRasterSource::queryRenderedFeatures(const ScreenLineString&,
const TransformState&,
const RenderStyle&,
const RenderedQueryOptions&) const {
return {};
return std::unordered_map<std::string, std::vector<Feature>>();
}
std::vector<Feature> RenderRasterSource::querySourceFeatures(const SourceQueryOptions&) const {
return {};
return std::vector<Feature>();
}
void RenderRasterSource::onLowMemory() {