[pre-commit.ci] pre-commit autoupdate (#2192)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
3a836b8fbb
commit
8bf3040da1
@@ -106,19 +106,17 @@ bool VertexAttributeGL::get(const gfx::VertexAttribute::ElementType& element, GL
|
||||
case GL_FLOAT:
|
||||
return gl::get<float>(element, buffer) || gl::get<float, std::int32_t>(element, buffer);
|
||||
case GL_FLOAT_VEC2:
|
||||
return gl::get<float2>(element, buffer) || gl::get<int2, float2>(element, buffer, [](int2 x) {
|
||||
return float2{(float)x[0], (float)x[1]};
|
||||
});
|
||||
return gl::get<float2>(element, buffer) ||
|
||||
gl::get<int2, float2>(element, buffer, [](int2 x) { return float2{(float)x[0], (float)x[1]}; });
|
||||
case GL_FLOAT_VEC3:
|
||||
return gl::get<float3>(element, buffer);
|
||||
case GL_FLOAT_VEC4:
|
||||
case GL_FLOAT_MAT2:
|
||||
return gl::get<float4>(element, buffer) ||
|
||||
gl::get<int4, float4>(element,
|
||||
buffer,
|
||||
[](int4 x) {
|
||||
return float4{(float)x[0], (float)x[1], (float)x[2], (float)x[3]};
|
||||
}) ||
|
||||
gl::get<int4, float4>(
|
||||
element,
|
||||
buffer,
|
||||
[](int4 x) { return float4{(float)x[0], (float)x[1], (float)x[2], (float)x[3]}; }) ||
|
||||
gl::get<ushort8, float4>(element, buffer, [](ushort8 x) {
|
||||
return float4{(float)x[0], (float)x[1], (float)x[2], (float)x[3]};
|
||||
});
|
||||
|
||||
@@ -25,7 +25,7 @@ public:
|
||||
bool,
|
||||
const CanonicalTileID&) = 0;
|
||||
|
||||
virtual void prepareSymbols(const GlyphMap&, const GlyphPositions&, const ImageMap&, const ImagePositions&){};
|
||||
virtual void prepareSymbols(const GlyphMap&, const GlyphPositions&, const ImageMap&, const ImagePositions&) {};
|
||||
|
||||
virtual bool hasSymbolInstances() const { return true; };
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
const ImagePositions&,
|
||||
const PatternLayerMap&,
|
||||
std::size_t,
|
||||
const CanonicalTileID&){};
|
||||
const CanonicalTileID&) {};
|
||||
|
||||
virtual void update(const FeatureStates&, const GeometryTileLayer&, const std::string&, const ImagePositions&) {}
|
||||
|
||||
|
||||
@@ -346,7 +346,7 @@ public:
|
||||
opacity(opacity_) {}
|
||||
~OutlineDrawableTweaker() override = default;
|
||||
|
||||
void init(gfx::Drawable&) override{};
|
||||
void init(gfx::Drawable&) override {};
|
||||
|
||||
virtual void execute(gfx::Drawable& drawable, const PaintParameters& parameters) override {
|
||||
if (!drawable.getTileID().has_value()) {
|
||||
|
||||
@@ -146,7 +146,7 @@ protected:
|
||||
}
|
||||
virtual void bind() { MBGL_CHECK_ERROR(glUseProgram(program)); }
|
||||
void detach() { MBGL_CHECK_ERROR(glUseProgram(0)); }
|
||||
virtual void pullLocations(){};
|
||||
virtual void pullLocations() {};
|
||||
|
||||
GLuint program = 0;
|
||||
GLuint vertexShader = 0;
|
||||
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
|
||||
void setPatternParameters(const std::optional<ImagePosition>&,
|
||||
const std::optional<ImagePosition>&,
|
||||
const CrossfadeParameters&) override{};
|
||||
const CrossfadeParameters&) override {};
|
||||
|
||||
std::tuple<float> interpolationFactor(float) const override { return std::tuple<float>{0.0f}; }
|
||||
|
||||
@@ -272,7 +272,7 @@ public:
|
||||
|
||||
void setPatternParameters(const std::optional<ImagePosition>&,
|
||||
const std::optional<ImagePosition>&,
|
||||
const CrossfadeParameters&) override{};
|
||||
const CrossfadeParameters&) override {};
|
||||
void populateVertexVector(const GeometryTileFeature& feature,
|
||||
std::size_t length,
|
||||
std::size_t index,
|
||||
@@ -391,7 +391,7 @@ public:
|
||||
|
||||
void setPatternParameters(const std::optional<ImagePosition>&,
|
||||
const std::optional<ImagePosition>&,
|
||||
const CrossfadeParameters&) override{};
|
||||
const CrossfadeParameters&) override {};
|
||||
void populateVertexVector(const GeometryTileFeature& feature,
|
||||
std::size_t length,
|
||||
std::size_t index,
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
bool supportsZoom(float zoom) const;
|
||||
|
||||
virtual void upload(gfx::UploadPass&) {}
|
||||
virtual void render(PaintParameters&){};
|
||||
virtual void render(PaintParameters&) {};
|
||||
|
||||
// Check wether the given geometry intersects
|
||||
// with the feature
|
||||
|
||||
@@ -26,7 +26,7 @@ private:
|
||||
const std::string& getName() const override { return name; }
|
||||
std::string name;
|
||||
#if MLN_DRAWABLE_RENDERER
|
||||
void updateDebugDrawables(DebugLayerGroupMap&, PaintParameters&) const override{};
|
||||
void updateDebugDrawables(DebugLayerGroupMap&, PaintParameters&) const override {};
|
||||
#endif
|
||||
mutable std::optional<gfx::Texture> debugTexture;
|
||||
};
|
||||
|
||||
@@ -188,7 +188,7 @@ void TileSourceRenderItem::updateDebugDrawables(DebugLayerGroupMap& debugLayerGr
|
||||
: linePropertiesUBO(properties) {}
|
||||
~PolylineDrawableTweaker() override = default;
|
||||
|
||||
void init(gfx::Drawable&) override{};
|
||||
void init(gfx::Drawable&) override {};
|
||||
|
||||
void execute(gfx::Drawable& drawable, const PaintParameters& parameters) override {
|
||||
if (!drawable.getTileID().has_value()) {
|
||||
|
||||
@@ -51,9 +51,8 @@ std::optional<T> Converter<T, typename std::enable_if_t<std::is_enum_v<T>>>::ope
|
||||
}
|
||||
|
||||
template <class T>
|
||||
auto Converter<std::vector<T>, typename std::enable_if_t<std::is_enum_v<T>>>::operator()(const Convertible& value,
|
||||
Error& error) const
|
||||
-> std::optional<std::vector<T>> {
|
||||
auto Converter<std::vector<T>, typename std::enable_if_t<std::is_enum_v<T>>>::operator()(
|
||||
const Convertible& value, Error& error) const -> std::optional<std::vector<T>> {
|
||||
if (!isArray(value)) {
|
||||
error.message = "value must be an array";
|
||||
return std::nullopt;
|
||||
|
||||
@@ -31,8 +31,7 @@ bool hasTokens(const std::string& source) {
|
||||
while (pos != end) {
|
||||
auto brace = std::find(pos, end, '{');
|
||||
if (brace == end) return false;
|
||||
for (brace++; brace != end && tokenReservedChars.find(*brace) == std::string::npos; brace++)
|
||||
;
|
||||
for (brace++; brace != end && tokenReservedChars.find(*brace) == std::string::npos; brace++);
|
||||
if (brace != end && *brace == '}') {
|
||||
return true;
|
||||
}
|
||||
@@ -65,8 +64,7 @@ std::unique_ptr<Expression> convertTokenStringToExpression(const std::string& so
|
||||
}
|
||||
pos = brace;
|
||||
if (pos != end) {
|
||||
for (brace++; brace != end && tokenReservedChars.find(*brace) == std::string::npos; brace++)
|
||||
;
|
||||
for (brace++; brace != end && tokenReservedChars.find(*brace) == std::string::npos; brace++);
|
||||
if (brace != end && *brace == '}') {
|
||||
inputs.push_back(get(literal(std::string(pos + 1, brace))));
|
||||
pos = brace + 1;
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
: linePropertiesUBO(properties) {}
|
||||
~LineDrawableTweaker() override = default;
|
||||
|
||||
void init(gfx::Drawable&) override{};
|
||||
void init(gfx::Drawable&) override {};
|
||||
|
||||
void execute(gfx::Drawable& drawable, const PaintParameters& parameters) override {
|
||||
if (!drawable.getTileID().has_value()) {
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
opacity(opacity_) {}
|
||||
~FillDrawableTweaker() override = default;
|
||||
|
||||
void init(gfx::Drawable&) override{};
|
||||
void init(gfx::Drawable&) override {};
|
||||
|
||||
void execute(gfx::Drawable& drawable, const PaintParameters& parameters) override {
|
||||
if (!drawable.getTileID().has_value()) {
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
: options(options_) {}
|
||||
~SymbolDrawableTweaker() override = default;
|
||||
|
||||
void init(gfx::Drawable&) override{};
|
||||
void init(gfx::Drawable&) override {};
|
||||
|
||||
void execute(gfx::Drawable& drawable, const PaintParameters& parameters) override {
|
||||
if (!drawable.getTileID().has_value()) {
|
||||
|
||||
@@ -439,10 +439,9 @@ void GeometryTileWorker::parse() {
|
||||
requestNewImages(imageDependencies);
|
||||
|
||||
MBGL_TIMING_FINISH(watch,
|
||||
" Action: "
|
||||
<< "Parsing,"
|
||||
<< " SourceID: " << sourceID.c_str() << " Canonical: " << static_cast<int>(id.canonical.z)
|
||||
<< "/" << id.canonical.x << "/" << id.canonical.y << " Time");
|
||||
" Action: " << "Parsing," << " SourceID: " << sourceID.c_str()
|
||||
<< " Canonical: " << static_cast<int>(id.canonical.z) << "/" << id.canonical.x << "/"
|
||||
<< id.canonical.y << " Time");
|
||||
finalizeLayout();
|
||||
}
|
||||
|
||||
@@ -493,10 +492,9 @@ void GeometryTileWorker::finalizeLayout() {
|
||||
firstLoad = false;
|
||||
|
||||
MBGL_TIMING_FINISH(watch,
|
||||
" Action: "
|
||||
<< "SymbolLayout,"
|
||||
<< " SourceID: " << sourceID.c_str() << " Canonical: " << static_cast<int>(id.canonical.z)
|
||||
<< "/" << id.canonical.x << "/" << id.canonical.y << " Time");
|
||||
" Action: " << "SymbolLayout," << " SourceID: " << sourceID.c_str()
|
||||
<< " Canonical: " << static_cast<int>(id.canonical.z) << "/" << id.canonical.x << "/"
|
||||
<< id.canonical.y << " Time");
|
||||
|
||||
parent.invoke(&GeometryTile::onLayout,
|
||||
std::make_shared<GeometryTile::LayoutResult>(
|
||||
|
||||
@@ -24,8 +24,7 @@ std::string replaceTokens(const std::string &source, const Lookup &lookup) {
|
||||
result.append(pos, brace);
|
||||
pos = brace;
|
||||
if (pos != end) {
|
||||
for (brace++; brace != end && tokenReservedChars.find(*brace) == std::string::npos; brace++)
|
||||
;
|
||||
for (brace++; brace != end && tokenReservedChars.find(*brace) == std::string::npos; brace++);
|
||||
if (brace != end && *brace == '}') {
|
||||
std::string key{pos + 1, brace};
|
||||
if (std::optional<std::string> replacement = lookup(key)) {
|
||||
|
||||
Reference in New Issue
Block a user