[core] GCC 4.9 is unable to deduce ctors when using bracket init
This commit is contained in:
@@ -17,6 +17,10 @@ using AnnotationIDs = std::vector<AnnotationID>;
|
||||
|
||||
class SymbolAnnotation {
|
||||
public:
|
||||
SymbolAnnotation(Point<double> geometry_, std::string icon_ = {})
|
||||
: geometry(std::move(geometry_)),
|
||||
icon(std::move(icon_)) {}
|
||||
|
||||
Point<double> geometry;
|
||||
std::string icon;
|
||||
};
|
||||
@@ -29,18 +33,36 @@ using ShapeAnnotationGeometry = variant<
|
||||
|
||||
class LineAnnotation {
|
||||
public:
|
||||
LineAnnotation(ShapeAnnotationGeometry geometry_,
|
||||
style::DataDrivenPropertyValue<float> opacity_ = 1.0f,
|
||||
style::DataDrivenPropertyValue<float> width_ = 1.0f,
|
||||
style::DataDrivenPropertyValue<Color> color_ = Color::black())
|
||||
: geometry(std::move(geometry_)),
|
||||
opacity(std::move(opacity_)),
|
||||
width(std::move(width_)),
|
||||
color(std::move(color_)) {}
|
||||
|
||||
ShapeAnnotationGeometry geometry;
|
||||
style::DataDrivenPropertyValue<float> opacity { 1.0f };
|
||||
style::DataDrivenPropertyValue<float> width { 1.0f };
|
||||
style::DataDrivenPropertyValue<Color> color { Color::black() };
|
||||
style::DataDrivenPropertyValue<float> opacity;
|
||||
style::DataDrivenPropertyValue<float> width;
|
||||
style::DataDrivenPropertyValue<Color> color;
|
||||
};
|
||||
|
||||
class FillAnnotation {
|
||||
public:
|
||||
FillAnnotation(ShapeAnnotationGeometry geometry_,
|
||||
style::DataDrivenPropertyValue<float> opacity_ = 1.0f,
|
||||
style::DataDrivenPropertyValue<Color> color_ = Color::black(),
|
||||
style::DataDrivenPropertyValue<Color> outlineColor_ = {})
|
||||
: geometry(std::move(geometry_)),
|
||||
opacity(std::move(opacity_)),
|
||||
color(std::move(color_)),
|
||||
outlineColor(std::move(outlineColor_)) {}
|
||||
|
||||
ShapeAnnotationGeometry geometry;
|
||||
style::DataDrivenPropertyValue<float> opacity { 1.0f };
|
||||
style::DataDrivenPropertyValue<Color> color { Color::black() };
|
||||
style::DataDrivenPropertyValue<Color> outlineColor {};
|
||||
style::DataDrivenPropertyValue<float> opacity;
|
||||
style::DataDrivenPropertyValue<Color> color;
|
||||
style::DataDrivenPropertyValue<Color> outlineColor;
|
||||
};
|
||||
|
||||
using Annotation = variant<
|
||||
|
||||
@@ -13,6 +13,11 @@ namespace mbgl {
|
||||
*/
|
||||
class RenderedQueryOptions {
|
||||
public:
|
||||
RenderedQueryOptions(optional<std::vector<std::string>> layerIDs_ = optional<std::vector<std::string>>(),
|
||||
optional<style::Filter> filter_ = optional<style::Filter>())
|
||||
: layerIDs(std::move(layerIDs_)),
|
||||
filter(std::move(filter_)) {}
|
||||
|
||||
/** layerIDs to include in the query */
|
||||
optional<std::vector<std::string>> layerIDs;
|
||||
|
||||
@@ -24,6 +29,11 @@ public:
|
||||
*/
|
||||
class SourceQueryOptions {
|
||||
public:
|
||||
SourceQueryOptions(optional<std::vector<std::string>> sourceLayers_ = optional<std::vector<std::string>> (),
|
||||
optional<style::Filter> filter_ = optional<style::Filter>())
|
||||
: sourceLayers(std::move(sourceLayers_)),
|
||||
filter(std::move(filter_)) {}
|
||||
|
||||
// Required for VectorSource, ignored for GeoJSONSource
|
||||
optional<std::vector<std::string>> sourceLayers;
|
||||
|
||||
|
||||
@@ -11,6 +11,11 @@ public:
|
||||
optional<Duration> duration = {};
|
||||
optional<Duration> delay = {};
|
||||
|
||||
TransitionOptions(optional<Duration> duration_ = optional<Duration>(),
|
||||
optional<Duration> delay_ = optional<Duration>())
|
||||
: duration(std::move(duration_)),
|
||||
delay(std::move(delay_)) {}
|
||||
|
||||
TransitionOptions reverseMerge(const TransitionOptions& defaults) const {
|
||||
return {
|
||||
duration ? duration : defaults.duration,
|
||||
|
||||
@@ -13,9 +13,18 @@ public:
|
||||
enum class Scheme : bool { XYZ, TMS };
|
||||
|
||||
std::vector<std::string> tiles;
|
||||
Range<uint8_t> zoomRange { 0, 22 };
|
||||
Range<uint8_t> zoomRange;
|
||||
std::string attribution;
|
||||
Scheme scheme = Scheme::XYZ;
|
||||
Scheme scheme;
|
||||
|
||||
Tileset(std::vector<std::string> tiles_ = std::vector<std::string>(),
|
||||
Range<uint8_t> zoomRange_ = { 0, 22 },
|
||||
std::string attribution_ = {},
|
||||
Scheme scheme_ = Scheme::XYZ)
|
||||
: tiles(std::move(tiles_)),
|
||||
zoomRange(std::move(zoomRange_)),
|
||||
attribution(std::move(attribution_)),
|
||||
scheme(scheme_) {}
|
||||
|
||||
// TileJSON also includes center, zoom, and bounds, but they are not used by mbgl.
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
- (mbgl::Annotation)annotationObjectWithDelegate:(__unused id <MGLMultiPointDelegate>)delegate
|
||||
{
|
||||
NSAssert(NO, @"Cannot add an annotation from an instance of %@", NSStringFromClass([self class]));
|
||||
return mbgl::SymbolAnnotation({mbgl::Point<double>()});
|
||||
return mbgl::SymbolAnnotation(mbgl::Point<double>());
|
||||
}
|
||||
|
||||
- (NSString *)description
|
||||
|
||||
@@ -8,12 +8,24 @@ namespace gl {
|
||||
|
||||
class Texture {
|
||||
public:
|
||||
Texture(Size size_, UniqueTexture texture_,
|
||||
TextureFilter filter_ = TextureFilter::Nearest,
|
||||
TextureMipMap mipmap_ = TextureMipMap::No,
|
||||
TextureWrap wrapX_ = TextureWrap::Clamp,
|
||||
TextureWrap wrapY_ = TextureWrap::Clamp)
|
||||
: size(std::move(size_)),
|
||||
texture(std::move(texture_)),
|
||||
filter(filter_),
|
||||
mipmap(mipmap_),
|
||||
wrapX(wrapX_),
|
||||
wrapY(wrapY_) {}
|
||||
|
||||
Size size;
|
||||
UniqueTexture texture;
|
||||
TextureFilter filter = TextureFilter::Nearest;
|
||||
TextureMipMap mipmap = TextureMipMap::No;
|
||||
TextureWrap wrapX = TextureWrap::Clamp;
|
||||
TextureWrap wrapY = TextureWrap::Clamp;
|
||||
TextureFilter filter;
|
||||
TextureMipMap mipmap;
|
||||
TextureWrap wrapX;
|
||||
TextureWrap wrapY;
|
||||
};
|
||||
|
||||
} // namespace gl
|
||||
|
||||
@@ -13,8 +13,29 @@ class GlyphManager;
|
||||
|
||||
class TileParameters {
|
||||
public:
|
||||
float pixelRatio;
|
||||
MapDebugOptions debugOptions;
|
||||
TileParameters(const float pixelRatio_,
|
||||
const MapDebugOptions debugOptions_,
|
||||
const TransformState& transformState_,
|
||||
Scheduler& workerScheduler_,
|
||||
FileSource& fileSource_,
|
||||
const MapMode mode_,
|
||||
AnnotationManager& annotationManager_,
|
||||
ImageManager& imageManager_,
|
||||
GlyphManager& glyphManager_,
|
||||
const uint8_t prefetchZoomDelta_)
|
||||
: pixelRatio(pixelRatio_),
|
||||
debugOptions(debugOptions_),
|
||||
transformState(std::move(transformState_)),
|
||||
workerScheduler(workerScheduler_),
|
||||
fileSource(fileSource_),
|
||||
mode(mode_),
|
||||
annotationManager(annotationManager_),
|
||||
imageManager(imageManager_),
|
||||
glyphManager(glyphManager_),
|
||||
prefetchZoomDelta(prefetchZoomDelta_) {}
|
||||
|
||||
const float pixelRatio;
|
||||
const MapDebugOptions debugOptions;
|
||||
const TransformState& transformState;
|
||||
Scheduler& workerScheduler;
|
||||
FileSource& fileSource;
|
||||
@@ -22,7 +43,7 @@ public:
|
||||
AnnotationManager& annotationManager;
|
||||
ImageManager& imageManager;
|
||||
GlyphManager& glyphManager;
|
||||
const uint8_t prefetchZoomDelta = 0;
|
||||
const uint8_t prefetchZoomDelta;
|
||||
};
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
@@ -16,6 +16,39 @@ class AnnotationManager;
|
||||
|
||||
class UpdateParameters {
|
||||
public:
|
||||
UpdateParameters(const MapMode mode_,
|
||||
const float pixelRatio_,
|
||||
const MapDebugOptions debugOptions_,
|
||||
const TimePoint timePoint_,
|
||||
const TransformState TransformState_,
|
||||
const std::string glyphURL_,
|
||||
const bool spriteLoaded_,
|
||||
const style::TransitionOptions transitionOptions_,
|
||||
const Immutable<style::Light::Impl> light_,
|
||||
const Immutable<std::vector<Immutable<style::Image::Impl>>> images_,
|
||||
const Immutable<std::vector<Immutable<style::Source::Impl>>> sources_,
|
||||
const Immutable<std::vector<Immutable<style::Layer::Impl>>> layers_,
|
||||
Scheduler& scheduler_,
|
||||
FileSource& fileSource_,
|
||||
AnnotationManager& annotationManager_,
|
||||
const uint8_t prefetchZoomDelta_)
|
||||
: mode(mode_),
|
||||
pixelRatio(pixelRatio_),
|
||||
debugOptions(debugOptions_),
|
||||
timePoint(std::move(timePoint_)),
|
||||
transformState(std::move(TransformState_)),
|
||||
glyphURL(std::move(glyphURL_)),
|
||||
spriteLoaded(spriteLoaded_),
|
||||
transitionOptions(std::move(transitionOptions_)),
|
||||
light(std::move(light_)),
|
||||
images(std::move(images_)),
|
||||
sources(std::move(sources_)),
|
||||
layers(std::move(layers_)),
|
||||
scheduler(scheduler_),
|
||||
fileSource(fileSource_),
|
||||
annotationManager(annotationManager_),
|
||||
prefetchZoomDelta(prefetchZoomDelta_) {}
|
||||
|
||||
const MapMode mode;
|
||||
const float pixelRatio;
|
||||
const MapDebugOptions debugOptions;
|
||||
@@ -34,7 +67,7 @@ public:
|
||||
FileSource& fileSource;
|
||||
AnnotationManager& annotationManager;
|
||||
|
||||
const uint8_t prefetchZoomDelta = 0;
|
||||
const uint8_t prefetchZoomDelta;
|
||||
};
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
@@ -5,9 +5,11 @@
|
||||
#include <mbgl/renderer/image_manager.hpp>
|
||||
#include <mbgl/text/glyph_manager.hpp>
|
||||
#include <mbgl/text/placement_config.hpp>
|
||||
#include <mbgl/text/collision_tile.hpp>
|
||||
#include <mbgl/util/feature.hpp>
|
||||
#include <mbgl/util/throttler.hpp>
|
||||
#include <mbgl/actor/actor.hpp>
|
||||
#include <mbgl/geometry/feature_index.hpp>
|
||||
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
@@ -17,8 +19,6 @@
|
||||
namespace mbgl {
|
||||
|
||||
class GeometryTileData;
|
||||
class FeatureIndex;
|
||||
class CollisionTile;
|
||||
class RenderStyle;
|
||||
class RenderLayer;
|
||||
class SourceQueryOptions;
|
||||
@@ -71,6 +71,15 @@ public:
|
||||
std::unique_ptr<FeatureIndex> featureIndex;
|
||||
std::unique_ptr<GeometryTileData> tileData;
|
||||
uint64_t correlationID;
|
||||
|
||||
LayoutResult(std::unordered_map<std::string, std::shared_ptr<Bucket>> nonSymbolBuckets_,
|
||||
std::unique_ptr<FeatureIndex> featureIndex_,
|
||||
std::unique_ptr<GeometryTileData> tileData_,
|
||||
uint64_t correlationID_)
|
||||
: nonSymbolBuckets(std::move(nonSymbolBuckets_)),
|
||||
featureIndex(std::move(featureIndex_)),
|
||||
tileData(std::move(tileData_)),
|
||||
correlationID(correlationID_) {}
|
||||
};
|
||||
void onLayout(LayoutResult);
|
||||
|
||||
@@ -81,6 +90,17 @@ public:
|
||||
optional<AlphaImage> glyphAtlasImage;
|
||||
optional<PremultipliedImage> iconAtlasImage;
|
||||
uint64_t correlationID;
|
||||
|
||||
PlacementResult(std::unordered_map<std::string, std::shared_ptr<Bucket>> symbolBuckets_,
|
||||
std::unique_ptr<CollisionTile> collisionTile_,
|
||||
optional<AlphaImage> glyphAtlasImage_,
|
||||
optional<PremultipliedImage> iconAtlasImage_,
|
||||
uint64_t correlationID_)
|
||||
: symbolBuckets(std::move(symbolBuckets_)),
|
||||
collisionTile(std::move(collisionTile_)),
|
||||
glyphAtlasImage(std::move(glyphAtlasImage_)),
|
||||
iconAtlasImage(std::move(iconAtlasImage_)),
|
||||
correlationID(correlationID_) {}
|
||||
};
|
||||
void onPlacement(PlacementResult);
|
||||
|
||||
|
||||
@@ -7,7 +7,14 @@ using namespace mbgl;
|
||||
struct Renderable {
|
||||
UnwrappedTileID id;
|
||||
ClipID clip;
|
||||
bool used = true;
|
||||
bool used;
|
||||
|
||||
Renderable(UnwrappedTileID id_,
|
||||
ClipID clip_,
|
||||
bool used_ = true)
|
||||
: id(std::move(id_)),
|
||||
clip(std::move(clip_)),
|
||||
used(used_) {}
|
||||
|
||||
bool operator==(const Renderable& rhs) const {
|
||||
return id == rhs.id && clip == rhs.clip;
|
||||
|
||||
@@ -60,7 +60,8 @@ public:
|
||||
MapMode::Continuous,
|
||||
annotationManager,
|
||||
imageManager,
|
||||
glyphManager
|
||||
glyphManager,
|
||||
0
|
||||
};
|
||||
|
||||
SourceTest() {
|
||||
|
||||
@@ -43,7 +43,8 @@ public:
|
||||
MapMode::Continuous,
|
||||
annotationManager,
|
||||
imageManager,
|
||||
glyphManager
|
||||
glyphManager,
|
||||
0
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ public:
|
||||
MapMode::Continuous,
|
||||
annotationManager,
|
||||
imageManager,
|
||||
glyphManager
|
||||
glyphManager,
|
||||
0
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -34,7 +34,8 @@ public:
|
||||
MapMode::Continuous,
|
||||
annotationManager,
|
||||
imageManager,
|
||||
glyphManager
|
||||
glyphManager,
|
||||
0
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -40,7 +40,8 @@ public:
|
||||
MapMode::Continuous,
|
||||
annotationManager,
|
||||
imageManager,
|
||||
glyphManager
|
||||
glyphManager,
|
||||
0
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user