From fba652eb7227e99064b6babbf36116c3e95ee48e Mon Sep 17 00:00:00 2001 From: Mike Taves Date: Tue, 14 Jul 2026 03:08:27 +1200 Subject: [PATCH] fix: typos (#4202) Co-authored-by: Bart Louwers --- CHANGELOG.md | 16 ++++++++-------- CMakeLists.txt | 2 +- README.md | 2 +- design-proposals/2022-09-02-kotlin.md | 2 +- design-proposals/2022-11-29-metal-port.md | 4 ++-- .../2023-06-17-android-annotations.md | 4 ++-- design-proposals/2025-05-08-plugin-layers.md | 4 ++-- docker/Dockerfile | 2 +- docs/doxygen/MAINPAGE.md | 2 +- docs/mdbook/src/platforms/android/README.md | 2 +- docs/mdbook/src/platforms/ios/README.md | 2 +- docs/mdbook/src/release-policy.md | 2 +- docs/mdbook/src/render-tests.md | 4 ++-- include/mbgl/actor/message.hpp | 2 +- include/mbgl/actor/scheduler.hpp | 2 +- include/mbgl/gfx/drawable_builder.hpp | 2 +- include/mbgl/gfx/gfx_types.hpp | 2 +- include/mbgl/gfx/renderer_backend.hpp | 2 +- include/mbgl/layermanager/layer_manager.hpp | 2 +- include/mbgl/map/map_observer.hpp | 2 +- include/mbgl/mtl/buffer_resource.hpp | 2 +- include/mbgl/renderer/render_target.hpp | 2 +- include/mbgl/shaders/gl/debug.hpp | 2 +- include/mbgl/shaders/mtl/debug.hpp | 2 +- include/mbgl/shaders/vulkan/debug.hpp | 2 +- include/mbgl/shaders/webgpu/debug.hpp | 2 +- include/mbgl/style/conversion_impl.hpp | 2 +- include/mbgl/tile/tile_id.hpp | 2 +- include/mbgl/util/tiny_unordered_map.hpp | 2 +- include/mbgl/util/work_task.hpp | 2 +- metrics/ignores/platform-android.json | 4 ++-- render-test/manifest_parser.cpp | 2 +- render-test/parser.cpp | 2 +- .../collect-benchmark-outputs.mjs | 2 +- scripts/generate-style-code.mjs | 2 +- scripts/style-spec.mjs | 2 +- scripts/ubsan.blacklist | 2 +- scripts/update-ios-examples.mjs | 2 +- shaders/debug.vertex.glsl | 2 +- src/mbgl/gfx/fill_generator.cpp | 8 ++++---- src/mbgl/gfx/polyline_generator.cpp | 2 +- src/mbgl/gl/context.cpp | 2 +- src/mbgl/gl/renderer_backend.cpp | 2 +- src/mbgl/map/transform_state.cpp | 2 +- src/mbgl/mtl/context.cpp | 2 +- src/mbgl/mtl/renderer_backend.cpp | 2 +- src/mbgl/plugin/plugin_layer_factory.cpp | 2 +- src/mbgl/programs/programs.cpp | 2 +- .../renderer/buckets/fill_extrusion_bucket.cpp | 2 +- src/mbgl/renderer/paint_property_binder.hpp | 4 ++-- src/mbgl/renderer/render_layer.hpp | 2 +- src/mbgl/renderer/renderer_impl.cpp | 2 +- .../renderer/sources/render_image_source.cpp | 2 +- src/mbgl/shaders/gl/legacy/programs.cpp | 2 +- src/mbgl/style/expression/distance.cpp | 2 +- src/mbgl/style/expression/formatted.cpp | 2 +- src/mbgl/style/layers/layer.cpp.ejs | 2 +- src/mbgl/text/bidi.hpp | 2 +- src/mbgl/text/collision_index.cpp | 2 +- src/mbgl/text/language_tag.hpp | 2 +- src/mbgl/text/quads.cpp | 2 +- src/mbgl/text/shaping.cpp | 2 +- src/mbgl/tile/geometry_tile.cpp | 2 +- src/mbgl/util/chrono.cpp | 2 +- src/mbgl/util/mapbox.cpp | 2 +- src/mbgl/util/tile_cover_impl.cpp | 2 +- src/mbgl/util/tile_cover_impl.hpp | 2 +- src/mbgl/util/url.hpp | 4 ++-- src/mbgl/vulkan/renderer_backend.cpp | 2 +- test/api/annotations.test.cpp | 2 +- test/src/mbgl/test/stub_layer_observer.hpp | 2 +- test/src/mbgl/test/stub_tile_observer.hpp | 2 +- test/storage/offline_database.test.cpp | 2 +- test/style/source.test.cpp | 2 +- test/text/glyph_manager.test.cpp | 3 +++ test/util/async_task.test.cpp | 12 ++++++------ 76 files changed, 100 insertions(+), 97 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0ebd68c4..7dffc0269 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,7 +68,7 @@ Default minimum tile update interval value is `Duration::zero()`. -- [core] Indroduce `distance` expression. ([#16397](https://github.com/mapbox/mapbox-gl-native/pull/16397)) +- [core] Introduce `distance` expression. ([#16397](https://github.com/mapbox/mapbox-gl-native/pull/16397)) The `distance` expression returns the shortest distance between two geometries. The returned value can be consumed as an input into another expression for changing a paint or layout property or filtering features by distance. @@ -164,7 +164,7 @@ - [core] Add Renderer::clearData() ([#16323](https://github.com/mapbox/mapbox-gl-native/pull/16323)) - The newly added `Renderer::clearData()` method allows to clear render data and thus save memory and make sure outdated tiles are not shown. It clears data more agressively than `Renderer::reduceMemoryUse()` does, as it clears not only the cache but all orchestration data, including the data used by the currently rendered frame. + The newly added `Renderer::clearData()` method allows to clear render data and thus save memory and make sure outdated tiles are not shown. It clears data more aggressively than `Renderer::reduceMemoryUse()` does, as it clears not only the cache but all orchestration data, including the data used by the currently rendered frame. - [android] Add jni binding for styleable snapshotter ([#16286](https://github.com/mapbox/mapbox-gl-native/pull/16286)) @@ -227,7 +227,7 @@ - [android] Update toGeoJSON in android_conversion.hpp ([#16243](https://github.com/mapbox/mapbox-gl-native/pull/16243)) - Before this chage, `toGeoJSON` method in `android_conversion.hpp` could not convert an Object (Map in android) to GeoJSON object. + Before this change, `toGeoJSON` method in `android_conversion.hpp` could not convert an Object (Map in android) to GeoJSON object. But `within` expression needs to accept an Object and then convert it to the GeoJSON object, now `toGeoJSON` method can convert both string and Object to GeoJSON. @@ -291,7 +291,7 @@ - [offline] Offline tool does not hang on 404 error ([#16240](https://github.com/mapbox/mapbox-gl-native/pull/16240)) - The missing resource gets skipped and teh offline region download continues. + The missing resource gets skipped and the offline region download continues. ##### ⚠️ Breaking changes @@ -302,7 +302,7 @@ Breaking code example: `auto fs = FileSourceManager::getFileSource(); fs->..` - Posible fix: + Possible fix: `std::shared_ptr fs = `; - The `mbgl::OnlineFileSource` class cannot be used directly ([#16238](https://github.com/mapbox/mapbox-gl-native/pull/16238)) @@ -343,7 +343,7 @@ The new `Source::setPrefetchZoomDelta(optional)` method allows overriding default tile prefetch setting that is defined by the Map instance. -- [core] Add support for `within expression`. Implement the use of `within expression` with paint propery and filter expression. ([#16157](https://github.com/mapbox/mapbox-gl-native/pull/16157)) +- [core] Add support for `within expression`. Implement the use of `within expression` with paint property and filter expression. ([#16157](https://github.com/mapbox/mapbox-gl-native/pull/16157)) The `within expression` enables checking whether a feature is inside a pre-defined geometry set/boundary or not. This `within expression` returns a boolean value, `true` indicates that the feature being evaluated is inside the geometry set. The returned value can be then consumed as input by another expression or used directly by a paint/layer property. @@ -363,7 +363,7 @@ - [core] Don't provide multiple responses with the same data for 304 replies ([#16200](https://github.com/mapbox/mapbox-gl-native/pull/16200)) - In cases when cached resource is useable, yet don't have an expiration timestamp, we provided data to the requester from the cache and the same data was returned once 304 response was received from the network. + In cases when cached resource is usable, yet don't have an expiration timestamp, we provided data to the requester from the cache and the same data was returned once 304 response was received from the network. - [core] Fix potential visual artifact for line-dasharray ([#16202](https://github.com/mapbox/mapbox-gl-native/pull/16202)) @@ -470,7 +470,7 @@ - [core] Retain thread pool in GeoJSONSource ([#15992](https://github.com/mapbox/mapbox-gl-native/pull/15992)) - Otherwise, the construction of the `Immutable` in background thread might never yeld. + Otherwise, the construction of the `Immutable` in background thread might never yield. - [core] Fix supercluster lambdas capturing ([#15989](https://github.com/mapbox/mapbox-gl-native/pull/15989)) diff --git a/CMakeLists.txt b/CMakeLists.txt index a2d6fa1be..a940a55d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1246,7 +1246,7 @@ if(MLN_WITH_METAL AND MLN_CREATE_AUTORELEASEPOOL) # in memory leaks when autoreleased objects are created. # Platforms such as iOS and GLFW use ARC with @autoreleasepool blocks, for these platforms - # creating an AutoreleasePool is not neccesary (and in fact will not work). + # creating an AutoreleasePool is not necessary (and in fact will not work). # When using MapLibre Native with Metal on other platforms such as Node.js, you can pass # this variable to ensure an AutoReleasePool is created in the render loop. # See also: diff --git a/README.md b/README.md index f2312336a..2857cc50a 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ There is an [npm package](https://www.npmjs.com/package/@maplibre/maplibre-gl-na ## Qt -Please check out the [`maplibre/maplibre-native-qt` repository](https://github.com/maplibre/maplibre-native-qt) to learn how to intergrate MapLibre Native with a Qt project. +Please check out the [`maplibre/maplibre-native-qt` repository](https://github.com/maplibre/maplibre-native-qt) to learn how to integrate MapLibre Native with a Qt project. ## Compose Multiplatform diff --git a/design-proposals/2022-09-02-kotlin.md b/design-proposals/2022-09-02-kotlin.md index 8de00a126..f6de73705 100644 --- a/design-proposals/2022-09-02-kotlin.md +++ b/design-proposals/2022-09-02-kotlin.md @@ -9,7 +9,7 @@ The argument for Kotlin over Java is typically along the lines of Kotlin being a Kotlin seems like a natural successor language to java, because it brings some advantages with no real downsides. It has full interoperability allowing us to port files 1-1. -There are also intersting features being added to the language that we can explore in the future if we decide to invest in kotlin competence now - such as [Kotlin Multiplatform](https://kotlinlang.org/docs/multiplatform.html#full-stack-web-applications) for cross-platform compilation. +There are also interesting features being added to the language that we can explore in the future if we decide to invest in kotlin competence now - such as [Kotlin Multiplatform](https://kotlinlang.org/docs/multiplatform.html#full-stack-web-applications) for cross-platform compilation. ## Proposed Change diff --git a/design-proposals/2022-11-29-metal-port.md b/design-proposals/2022-11-29-metal-port.md index 6b7be83c8..e1144be65 100644 --- a/design-proposals/2022-11-29-metal-port.md +++ b/design-proposals/2022-11-29-metal-port.md @@ -196,7 +196,7 @@ If you thought real time rendering was mostly about triangles, I have some bad n The boring way is to allocate Buffers and stick your geometry, indices, textures, uniforms, car keys, manifesto, and texture coordinates in them. They're just memory. You ask for how much you want, you get a handle, you copy what you need into place. You fix whatever buffer overruns you created. -Metal isn't fussy about a buffer containing vertices vs. indices vs. uniforms. Mostly. So you build a little buffer management infrastructure and alway use it. +Metal isn't fussy about a buffer containing vertices vs. indices vs. uniforms. Mostly. So you build a little buffer management infrastructure and always use it. The nice thing about Buffer allocation in Metal is it can be easily done from any thread. The bad thing is all those little bits of memory are time consuming to track and control, just like in any system. Thus there is a better way. @@ -329,7 +329,7 @@ Typically bottlenecks are where the main CPU is waiting on something it shouldn' MapLibre Native makes some use of threads, but not as much as it should. With OpenGL it's not using shared contexts, though it does a lot of work in the Layers to prep for the GL work that has to be done on the main thread. So it's not terrible, but it obviously could be better. -Mobile devices, even the really cheap ones, now have a lot of CPU cores and a lot of opportunity for work to be done off the main thread. Maps have an embarassing amount of high level parallelism. It's worth periodically analyzing the performance to see what might be updated for data loading. +Mobile devices, even the really cheap ones, now have a lot of CPU cores and a lot of opportunity for work to be done off the main thread. Maps have an embarrassing amount of high level parallelism. It's worth periodically analyzing the performance to see what might be updated for data loading. The benefits are faster loading, lower latency, better responsiveness to the user. diff --git a/design-proposals/2023-06-17-android-annotations.md b/design-proposals/2023-06-17-android-annotations.md index a3f87a713..63f857db4 100644 --- a/design-proposals/2023-06-17-android-annotations.md +++ b/design-proposals/2023-06-17-android-annotations.md @@ -16,7 +16,7 @@ The following ideas drive the design proposal for the improved API. * (G1 **`maplibre-native`**) The annotation API should be a part of `maplibre-native`. * (G2 **frictionless migration**) The new API should create as few friction as necessary for existing users of the annotations plugin during migrations. -* (G3 **Kotlin-first**) The API should facilitate Kotlin langauge features where appropriate. +* (G3 **Kotlin-first**) The API should facilitate Kotlin language features where appropriate. * (G4 **power**) The annotations API should be as powereful as it was before. No functionality should be lost. * (G5 **learnability**) At the same time, it should have a high learnability, such that new users find their way around the API with ease. * (G6 **ease**) The API should be user-friendly and easy to use. @@ -113,7 +113,7 @@ The `setUsedDataDrivenProperties` mechanism should check for variations to the d The annotations API currently uses code generation to generate the annotation objects. This should no longer be done in the future for the following reasons. -* Code generation incentivises non-specific, flat APIs – even where hiearchical objects or other specific constructs make more sense. +* Code generation incentivises non-specific, flat APIs – even where hierarchical objects or other specific constructs make more sense. * In a similar way, it makes it harder to assign documentation to specific method →(G5 **learnability**). The current generated docs don't read like they were written with the Android implementation in mind, because they are copied from the spec. * When switching to Kotlin and when removing the `*Options` classes (G3 **Kotlin-first**), boilerplate code is reduced by a significant amount. diff --git a/design-proposals/2025-05-08-plugin-layers.md b/design-proposals/2025-05-08-plugin-layers.md index b09cc146d..15fbd89c2 100644 --- a/design-proposals/2025-05-08-plugin-layers.md +++ b/design-proposals/2025-05-08-plugin-layers.md @@ -6,7 +6,7 @@ This project is to add the ability to "register" additional layer types at runti ## Proposed Change -For the initial implemention, the following functionality is proposed: +For the initial implementation, the following functionality is proposed: * At the platform level, be able to register a plug-in layer that is then parseable by the style parser * The plug-in layer will be limited to simple rendering (via handing off the rendering context to the plug-in layer) and will not include the ability to define drawables/etc @@ -18,7 +18,7 @@ Future features: * Placeholder for ideas that could be implemented in the future ## Example IOS Utilization -An example implemention is shown in the PR: https://github.com/maplibre/maplibre-native/pull/3430 +An example implementation is shown in the PR: https://github.com/maplibre/maplibre-native/pull/3430 The platform/darwin/app/PluginLayerExampleMetalRendering.h/mm class shows how the layer manages it's own rendering and how properties from the style are passed to it. In platform/ios/app/MBXViewController.mm there's a single line where the plug-in layer class is registered with the map view ``` [self.mapView addPluginLayerType:[PluginLayerExampleMetalRendering class]]; diff --git a/docker/Dockerfile b/docker/Dockerfile index 89fbe5a90..abe4f46db 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -45,7 +45,7 @@ ARG USERNAME=ubuntu ARG USER_UID=1000 ARG USER_GID=$USER_UID -# Create docker user wuth sudo rights as passed in by the build command +# Create docker user with sudo rights as passed in by the build command # This was modeled on https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user # On a Mac, USER_GID might already exist, so ignore it if it fails (--force) RUN groupmod --gid $USER_GID $USERNAME \ diff --git a/docs/doxygen/MAINPAGE.md b/docs/doxygen/MAINPAGE.md index d8e5ecd9c..890188ba7 100644 --- a/docs/doxygen/MAINPAGE.md +++ b/docs/doxygen/MAINPAGE.md @@ -1,5 +1,5 @@ # MapLibre Native Core Documentation -This is the documentation of the public C++ API of MapLibre Native Core. You would normally only use this API if you are a contributor to one of the platform specific APIs. If you want to intergrate use MapLibre Native in your project, you are better served by [documentation specific to your platform](https://maplibre.org/projects/maplibre-native/), unless you are interested in the internals of MapLibre Native. +This is the documentation of the public C++ API of MapLibre Native Core. You would normally only use this API if you are a contributor to one of the platform specific APIs. If you want to integrate use MapLibre Native in your project, you are better served by [documentation specific to your platform](https://maplibre.org/projects/maplibre-native/), unless you are interested in the internals of MapLibre Native. The source code can be found [on GitHub](https://github.com/maplibre/maplibre-native) (the `include` directory contains the public API). diff --git a/docs/mdbook/src/platforms/android/README.md b/docs/mdbook/src/platforms/android/README.md index e6cadc871..78e19a905 100644 --- a/docs/mdbook/src/platforms/android/README.md +++ b/docs/mdbook/src/platforms/android/README.md @@ -39,7 +39,7 @@ All new code should be written in [Kotlin](https://kotlinlang.org/). ## Style Checking -To check Kotlin style, we use [ktlint](https://pinterest.github.io/ktlint/). This linter is based on the [official Kotlin coding conventions](https://kotlinlang.org/docs/coding-conventions.html). We intergrate with it using the [kotlinder](https://github.com/jeremymailen/kotlinter-gradle) Gradle plugin. +To check Kotlin style, we use [ktlint](https://pinterest.github.io/ktlint/). This linter is based on the [official Kotlin coding conventions](https://kotlinlang.org/docs/coding-conventions.html). We integrate with it using the [kotlinder](https://github.com/jeremymailen/kotlinter-gradle) Gradle plugin. To check the style of all Kotlin source files, use: diff --git a/docs/mdbook/src/platforms/ios/README.md b/docs/mdbook/src/platforms/ios/README.md index 58b72f199..ab4264009 100644 --- a/docs/mdbook/src/platforms/ios/README.md +++ b/docs/mdbook/src/platforms/ios/README.md @@ -4,7 +4,7 @@ [Bazel](https://bazel.build/) is used for building on iOS. -You can generate an Xcode project thanks to [rules_xcodeproj](https://github.com/MobileNativeFoundation/rules_xcodeproj) intergration. +You can generate an Xcode project thanks to [rules_xcodeproj](https://github.com/MobileNativeFoundation/rules_xcodeproj) integration. You need to install [bazelisk](https://github.com/bazelbuild/bazelisk), which is a wrapper around Bazel which ensures that the version specified in `.bazelversion` is used. diff --git a/docs/mdbook/src/release-policy.md b/docs/mdbook/src/release-policy.md index 614a2f925..323fcd872 100644 --- a/docs/mdbook/src/release-policy.md +++ b/docs/mdbook/src/release-policy.md @@ -1,7 +1,7 @@ # Release Policy > [!NOTE] -> The following release policiy applies specifically to MapLibre **Android** and MapLibre **iOS**. +> The following release policy applies specifically to MapLibre **Android** and MapLibre **iOS**. - We use [semantic versioning](https://semver.org/). Breaking changes will always result in a major release. - Despite having extensive tests in place, as a FOSS project we have limited QA testing capabilities. When major changes took place we may opt to put out a pre-release to let the community help with testing. diff --git a/docs/mdbook/src/render-tests.md b/docs/mdbook/src/render-tests.md index 8a90de7cf..ba72f5680 100644 --- a/docs/mdbook/src/render-tests.md +++ b/docs/mdbook/src/render-tests.md @@ -35,7 +35,7 @@ property: `background-color`, `line-width`, etc., with a second level of directo The JSON files in this directory are the manifests (to be passed to render test CLI tool). This directory also contains many directories that store metrics used by the tests. Other files/directories include: -- `cache-style.db`, `cache-metrics.db`: pre-populated cache (SQLite database file) so the tests can run offline. You may need to update this database when you need a new resource available during test executation. +- `cache-style.db`, `cache-metrics.db`: pre-populated cache (SQLite database file) so the tests can run offline. You may need to update this database when you need a new resource available during test execution. - `binary-size`: binary-size checks. Not used right now, see [#3379](https://github.com/maplibre/maplibre-native/issues/3379). - `expectations`: expectations for various platforms. E.g. `expectations/platform-android` is referenced by the `android-render-test-runner-metrics.json` manifest under its `expectation_paths` key. - `ignores`: contains JSON files with as key a test path and as value a reason why a test is ignored. For example: @@ -57,7 +57,7 @@ The JSON files in this directory are the manifests (to be passed to render test } ``` -#### `metrics/intergration` +#### `metrics/integration` - `data`, `geojson`, `glyphs`, `image`, `sprites`, `styles`, `tiles`, `tilesets`, `video`: various data used by the render tests. - `expression-tests`: tests that verify the behavior of [expressions](https://maplibre.org/maplibre-style-spec/expressions/) of the MapLibre Style Spec. diff --git a/include/mbgl/actor/message.hpp b/include/mbgl/actor/message.hpp index 1ec011284..0f497557e 100644 --- a/include/mbgl/actor/message.hpp +++ b/include/mbgl/actor/message.hpp @@ -6,7 +6,7 @@ namespace mbgl { // A movable type-erasing function wrapper. This allows to store arbitrary -// invokable things (like std::function<>, or the result of a movable-only +// invocable things (like std::function<>, or the result of a movable-only // std::bind()) in the queue. Source: http://stackoverflow.com/a/29642072/331379 class Message { public: diff --git a/include/mbgl/actor/scheduler.hpp b/include/mbgl/actor/scheduler.hpp index e6fa414ea..03687a2bd 100644 --- a/include/mbgl/actor/scheduler.hpp +++ b/include/mbgl/actor/scheduler.hpp @@ -95,7 +95,7 @@ public: /// Get the *sequenced* scheduler for asynchronous tasks. /// Unlike the method above, the returned scheduler /// (once stored) represents a single thread, thus each - /// newly scheduled task is guarantied to run after the + /// newly scheduled task is guaranteed to run after the /// previously scheduled one. /// /// Sequenced scheduler can be used for running tasks diff --git a/include/mbgl/gfx/drawable_builder.hpp b/include/mbgl/gfx/drawable_builder.hpp index e18261307..efdc8bade 100644 --- a/include/mbgl/gfx/drawable_builder.hpp +++ b/include/mbgl/gfx/drawable_builder.hpp @@ -213,7 +213,7 @@ public: /// Add a polyline in geographic coordinates, using wide vectors. void addWideVectorPolylineGlobal(const LineString& coordinates, const gfx::PolylineGeneratorOptions&); - /// return the curent vertex count + /// return the current vertex count std::size_t curVertexCount() const; bool empty() const { return !(drawables.size() || curVertexCount()); } diff --git a/include/mbgl/gfx/gfx_types.hpp b/include/mbgl/gfx/gfx_types.hpp index 933f94460..afb4794b5 100644 --- a/include/mbgl/gfx/gfx_types.hpp +++ b/include/mbgl/gfx/gfx_types.hpp @@ -8,7 +8,7 @@ namespace gfx { /// Graphic primitive type enumeration enum class PrimitiveType : uint8_t { Point, ///< point primitive - Line, ///< line primive + Line, ///< line primitive Triangle, ///< triangle primitive }; diff --git a/include/mbgl/gfx/renderer_backend.hpp b/include/mbgl/gfx/renderer_backend.hpp index 5dd249472..53f877945 100644 --- a/include/mbgl/gfx/renderer_backend.hpp +++ b/include/mbgl/gfx/renderer_backend.hpp @@ -64,7 +64,7 @@ protected: /// 1. When releasing GL resources during Renderer destruction /// (Including calling CustomLayerHost::deinitialize during /// RenderCustomLayer destruction) - /// 2. When renderering through Renderer::render() + /// 2. When rendering through Renderer::render() /// (Including calling CustomLayerHost::initialize for newly added /// custom layers and /// CustomLayerHost::deinitialize on layer removal) diff --git a/include/mbgl/layermanager/layer_manager.hpp b/include/mbgl/layermanager/layer_manager.hpp index f70c862eb..e67e06550 100644 --- a/include/mbgl/layermanager/layer_manager.hpp +++ b/include/mbgl/layermanager/layer_manager.hpp @@ -60,7 +60,7 @@ public: * not provide line, fill or symbol layers (those, used by the annotations * implementation). * - * Note: in future, annotations implemantation will be moved from the core + * Note: in future, annotations implementation will be moved from the core * to platform SDK (see * https://github.com/maplibre/maplibre-plugins-android) * and this flag won't be needed any more. diff --git a/include/mbgl/map/map_observer.hpp b/include/mbgl/map/map_observer.hpp index d398c47f5..c55b465f5 100644 --- a/include/mbgl/map/map_observer.hpp +++ b/include/mbgl/map/map_observer.hpp @@ -46,7 +46,7 @@ public: struct RenderFrameStatus { RenderMode mode; - bool needsRepaint; // In continous mode, shows that there are ongoig transitions. + bool needsRepaint; // In continuous mode, shows that there are ongoig transitions. bool placementChanged; gfx::RenderingStats renderingStats; }; diff --git a/include/mbgl/mtl/buffer_resource.hpp b/include/mbgl/mtl/buffer_resource.hpp index 98348a706..7eed30648 100644 --- a/include/mbgl/mtl/buffer_resource.hpp +++ b/include/mbgl/mtl/buffer_resource.hpp @@ -68,7 +68,7 @@ public: std::size_t index, std::size_t size) const noexcept; - /// Update the offset, when this buffer is alread bound to the specified index (unchecked). + /// Update the offset, when this buffer is already bound to the specified index (unchecked). void updateVertexBindOffset(const MTLRenderCommandEncoderPtr&, std::size_t offset, std::size_t index, diff --git a/include/mbgl/renderer/render_target.hpp b/include/mbgl/renderer/render_target.hpp index 4d57b1994..45ce5a67e 100644 --- a/include/mbgl/renderer/render_target.hpp +++ b/include/mbgl/renderer/render_target.hpp @@ -49,7 +49,7 @@ public: /// @brief Get a specific layer group by index /// @param layerIndex index - /// @return the layer group if existant, othewise a shared null pointer + /// @return the layer group if existent, otherwise a shared null pointer const LayerGroupBasePtr& getLayerGroup(const int32_t layerIndex) const; /// Execute the given function for each contained layer group diff --git a/include/mbgl/shaders/gl/debug.hpp b/include/mbgl/shaders/gl/debug.hpp index c0782a655..0481486e5 100644 --- a/include/mbgl/shaders/gl/debug.hpp +++ b/include/mbgl/shaders/gl/debug.hpp @@ -22,7 +22,7 @@ layout (std140) uniform DebugUBO { void main() { // This vertex shader expects a EXTENT x EXTENT quad, - // The UV co-ordinates for the overlay texture can be calculated using that knowledge + // The UV coordinates for the overlay texture can be calculated using that knowledge v_uv = a_pos / 8192.0; gl_Position = u_matrix * vec4(a_pos * u_overlay_scale, 0, 1); } diff --git a/include/mbgl/shaders/mtl/debug.hpp b/include/mbgl/shaders/mtl/debug.hpp index 649ccf758..3bbb1ff6e 100644 --- a/include/mbgl/shaders/mtl/debug.hpp +++ b/include/mbgl/shaders/mtl/debug.hpp @@ -55,7 +55,7 @@ FragmentStage vertex vertexMain(thread const VertexStage vertx [[stage_in]], const float4 position = debug.matrix * float4(float2(vertx.pos) * debug.overlay_scale, 0, 1); // This vertex shader expects a EXTENT x EXTENT quad, - // The UV co-ordinates for the overlay texture can be calculated using that knowledge + // The UV coordinates for the overlay texture can be calculated using that knowledge float2 uv = float2(vertx.pos) / 8192.0; return { diff --git a/include/mbgl/shaders/vulkan/debug.hpp b/include/mbgl/shaders/vulkan/debug.hpp index fc4020ecb..a24011052 100644 --- a/include/mbgl/shaders/vulkan/debug.hpp +++ b/include/mbgl/shaders/vulkan/debug.hpp @@ -38,7 +38,7 @@ void main() { applySurfaceTransform(); // This vertex shader expects a EXTENT x EXTENT quad, - // The UV co-ordinates for the overlay texture can be calculated using that knowledge + // The UV coordinates for the overlay texture can be calculated using that knowledge frag_uv = in_position / 8192.0; } )"; diff --git a/include/mbgl/shaders/webgpu/debug.hpp b/include/mbgl/shaders/webgpu/debug.hpp index 77c0b6596..fe6344a4f 100644 --- a/include/mbgl/shaders/webgpu/debug.hpp +++ b/include/mbgl/shaders/webgpu/debug.hpp @@ -43,7 +43,7 @@ fn main(in: VertexInput) -> VertexOutput { out.position = debug.matrix * vec4(scaled_pos, 0.0, 1.0); // This vertex shader expects a EXTENT x EXTENT quad, - // The UV co-ordinates for the overlay texture can be calculated using that knowledge + // The UV coordinates for the overlay texture can be calculated using that knowledge out.uv = vec2(f32(in.position.x), f32(in.position.y)) / 8192.0; return out; diff --git a/include/mbgl/style/conversion_impl.hpp b/include/mbgl/style/conversion_impl.hpp index cf425b09d..2fa578839 100644 --- a/include/mbgl/style/conversion_impl.hpp +++ b/include/mbgl/style/conversion_impl.hpp @@ -78,7 +78,7 @@ namespace style { `const char *`; return value: * is true when evaluated in a boolean context iff the named member exists - * is convertable to a `V` or `V&` when dereferenced + * is convertible to a `V` or `V&` when dereferenced * `eachMember(v, [] (const std::string&, const V&) -> std::optional {...})` -- called only if `isObject(v)`; calls the provided lambda once for each key and value of the object; short-circuits if any call returns an diff --git a/include/mbgl/tile/tile_id.hpp b/include/mbgl/tile/tile_id.hpp index 340dfe417..94df1257e 100644 --- a/include/mbgl/tile/tile_id.hpp +++ b/include/mbgl/tile/tile_id.hpp @@ -42,7 +42,7 @@ std::string toString(const CanonicalTileID&); } // namespace util // Has integer z/x/y coordinates -// overscaledZ describes the zoom level this tile is intented to represent, e.g. +// overscaledZ describes the zoom level this tile is intended to represent, e.g. // when parsing data z is never larger than the source's maxzoom z/x/y describe // the class OverscaledTileID { diff --git a/include/mbgl/util/tiny_unordered_map.hpp b/include/mbgl/util/tiny_unordered_map.hpp index 44164d032..427f4506e 100644 --- a/include/mbgl/util/tiny_unordered_map.hpp +++ b/include/mbgl/util/tiny_unordered_map.hpp @@ -11,7 +11,7 @@ namespace util { /// A wrapper around `unordered_map` which uses linear search below some threshold of size. /// /// Currently an immutable map, not allowing insert or delete, but could be extended to allow that, with extra cost when -/// transitioning over the threshold value, of course. The maped values can be modified via reference accessors, just +/// transitioning over the threshold value, of course. The mapped values can be modified via reference accessors, just /// not the set of keys or the keys themselves. Since the small-case elements are stored separately from /// `unordered_map`, we can't use that class' iterators, and its interface is private. A wrapper iterator might allow /// for a better and more complete public interface. diff --git a/include/mbgl/util/work_task.hpp b/include/mbgl/util/work_task.hpp index 3f44f529b..35784edab 100644 --- a/include/mbgl/util/work_task.hpp +++ b/include/mbgl/util/work_task.hpp @@ -7,7 +7,7 @@ namespace mbgl { /// A movable type-erasing function wrapper. This allows to store arbitrary -/// invokable things (like std::function<>, or the result of a movable-only +/// invocable things (like std::function<>, or the result of a movable-only /// std::bind()) in the queue. Source: /// http://stackoverflow.com/a/29642072/331379 class WorkTask : private util::noncopyable { diff --git a/metrics/ignores/platform-android.json b/metrics/ignores/platform-android.json index f74ca31cf..ac3f93b0d 100644 --- a/metrics/ignores/platform-android.json +++ b/metrics/ignores/platform-android.json @@ -3,8 +3,8 @@ "probes/gfx/pass-double-probe": "Needs to be investigated and fixed.", "probes/gfx/pass-probe-reset": "Needs to be investigated and fixed.", "probes/network/pass": "Needs to be investigated and fixed.", - "render-tests/icon-text-fit/both-text-anchor-1x-image-2x-screen": "Temporarily fails as android test app does not derefence symbolinks in sprites folder.", - "render-tests/icon-text-fit/both-text-anchor-2x-image-1x-screen": "Temporarily fails as android test app does not derefence symbolinks in sprites folder.", + "render-tests/icon-text-fit/both-text-anchor-1x-image-2x-screen": "Temporarily fails as android test app does not dereference symbolinks in sprites folder.", + "render-tests/icon-text-fit/both-text-anchor-2x-image-1x-screen": "Temporarily fails as android test app does not dereference symbolinks in sprites folder.", "render-tests/line-pattern/overscaled": "Needs to be investigated and fixed.", "render-tests/regressions/mapbox-gl-js#5911a": "Needs to be investigated and fixed.", "render-tests/regressions/mapbox-gl-native#9976": "Needs to be investigated and fixed.", diff --git a/render-test/manifest_parser.cpp b/render-test/manifest_parser.cpp index c6f716bee..3c458b536 100644 --- a/render-test/manifest_parser.cpp +++ b/render-test/manifest_parser.cpp @@ -72,7 +72,7 @@ std::vector> parseIgnores(const std::vector< return ignores; } -// defaultExpectationPath: absolute path that constains the style.json file for testing +// defaultExpectationPath: absolute path that contains the style.json file for testing // testId: Test case id that used for composing expectation path // expectatedPaths: absolute paths that contain possible expected.png/metrics.json files for result checking std::vector getTestExpectations(const mbgl::filesystem::path& defaultExpectationPath, diff --git a/render-test/parser.cpp b/render-test/parser.cpp index a5788e3d9..66bff0a82 100644 --- a/render-test/parser.cpp +++ b/render-test/parser.cpp @@ -1227,7 +1227,7 @@ TestOperations parseTestOperations(TestMetadata& metadata) { assert(operationArray[4].IsArray()); // end [lat, lng, zoom] if (metadata.mapMode != mbgl::MapMode::Continuous) { - metadata.errorMessage = "Map mode must be Continous for " + panGestureOp + " operation"; + metadata.errorMessage = "Map mode must be Continuous for " + panGestureOp + " operation"; return {}; } diff --git a/scripts/aws-device-farm/collect-benchmark-outputs.mjs b/scripts/aws-device-farm/collect-benchmark-outputs.mjs index 202c7c6df..a292a2d56 100644 --- a/scripts/aws-device-farm/collect-benchmark-outputs.mjs +++ b/scripts/aws-device-farm/collect-benchmark-outputs.mjs @@ -77,7 +77,7 @@ async function writeResultsToOutputDir() { const benchmarkResultContents = await fs.readFile(fullBenchmarkResultPath, {encoding: 'utf-8'}); const benchmarkResults = JSON.parse(benchmarkResultContents); const { timestamp } = benchmarkResults; - if (typeof timestamp !== 'number') throw new Error("No timestamp found in bechmark result"); + if (typeof timestamp !== 'number') throw new Error("No timestamp found in benchmark result"); await fs.copyFile(fullBenchmarkResultPath, path.join(outputDir, `${timestamp}.json`)); } catch (err) { console.error(`Error ${err}. Skipping: '${benchmarkResultPath}'`); diff --git a/scripts/generate-style-code.mjs b/scripts/generate-style-code.mjs index 1f1eca7d4..291baeeb5 100644 --- a/scripts/generate-style-code.mjs +++ b/scripts/generate-style-code.mjs @@ -379,7 +379,7 @@ for (let layer of layers) { writeIfModified(`src/mbgl/style/layers/${layerFileName}_layer_properties.hpp`, propertiesHpp(layer), outLocation); writeIfModified(`src/mbgl/style/layers/${layerFileName}_layer_properties.cpp`, propertiesCpp(layer), outLocation); - // Remove our fake property for the external interace. + // Remove our fake property for the external interface. if (layer.type === 'line') { layer.paintProperties = layer.paintProperties.filter(property => property.name !== 'line-floor-width'); } diff --git a/scripts/style-spec.mjs b/scripts/style-spec.mjs index cb383cd91..7329ee975 100644 --- a/scripts/style-spec.mjs +++ b/scripts/style-spec.mjs @@ -73,7 +73,7 @@ modifiedReferenceSpec["paint_location-indicator"] = { "zoom" ] }, - "doc": "The displacement off the center of the top image and the shadow image when the pitch of the map is greater than 0. This helps producing a three-dimensional appearence." + "doc": "The displacement off the center of the top image and the shadow image when the pitch of the map is greater than 0. This helps producing a three-dimensional appearance." }, "bearing": { "type": "number", diff --git a/scripts/ubsan.blacklist b/scripts/ubsan.blacklist index 29cbf17b7..bae700d19 100644 --- a/scripts/ubsan.blacklist +++ b/scripts/ubsan.blacklist @@ -9,7 +9,7 @@ src:*/mbgl/util/hash.hpp ############################################################################# # vendor libs -# unsigned integer overflow: unsigned interger index in for loop +# unsigned integer overflow: unsigned integer index in for loop src:*/vendor/earcut.hpp/include/mapbox/earcut.hpp # unsigned integer overflow: hash function: str_hash diff --git a/scripts/update-ios-examples.mjs b/scripts/update-ios-examples.mjs index 203211121..d138f3597 100644 --- a/scripts/update-ios-examples.mjs +++ b/scripts/update-ios-examples.mjs @@ -124,7 +124,7 @@ async function updateDocumentation(documentationPath, examples) { } if (status.tag === 'find-codeblock') { - throw Error(`Ended evalution while looking for codeblock with id '${status.id}'`); + throw Error(`Ended evaluation while looking for codeblock with id '${status.id}'`); } if (status.tag === 'skip-to-codeblock-end') { diff --git a/shaders/debug.vertex.glsl b/shaders/debug.vertex.glsl index 10236b141..c8cf0171f 100644 --- a/shaders/debug.vertex.glsl +++ b/shaders/debug.vertex.glsl @@ -12,7 +12,7 @@ layout (std140) uniform DebugUBO { void main() { // This vertex shader expects a EXTENT x EXTENT quad, - // The UV co-ordinates for the overlay texture can be calculated using that knowledge + // The UV coordinates for the overlay texture can be calculated using that knowledge v_uv = a_pos / 8192.0; gl_Position = u_matrix * vec4(a_pos * u_overlay_scale, 0, 1); } diff --git a/src/mbgl/gfx/fill_generator.cpp b/src/mbgl/gfx/fill_generator.cpp index 4f4a627aa..1669b6b0e 100644 --- a/src/mbgl/gfx/fill_generator.cpp +++ b/src/mbgl/gfx/fill_generator.cpp @@ -111,7 +111,7 @@ void generateFillBuffers(const GeometryCollection& geometry, gfx::IndexVector& fillIndexes, SegmentVector& fillSegments) { for (auto& polygon : classifyRings(geometry)) { - // Optimize polygons with many interior rings for earcut tesselation. + // Optimize polygons with many interior rings for earcut tessellation. limitHoles(polygon, 500); std::size_t totalVertices = totalVerticesCheck(polygon); @@ -133,7 +133,7 @@ void generateFillAndOutineBuffers(const GeometryCollection& geometry, gfx::IndexVector& lineIndexes, SegmentVector& lineSegments) { for (auto& polygon : classifyRings(geometry)) { - // Optimize polygons with many interior rings for earcut tesselation. + // Optimize polygons with many interior rings for earcut tessellation. limitHoles(polygon, 500); std::size_t totalVertices = totalVerticesCheck(polygon); @@ -171,7 +171,7 @@ void generateFillAndOutineBuffers(const GeometryCollection& geometry, lineOptions.type = FeatureType::Polygon; for (auto& polygon : classifyRings(geometry)) { - // Optimize polygons with many interior rings for earcut tesselation. + // Optimize polygons with many interior rings for earcut tessellation. limitHoles(polygon, 500); std::size_t totalVertices = totalVerticesCheck(polygon); @@ -223,7 +223,7 @@ void generateFillAndOutineBuffers(const GeometryCollection& geometry, } for (auto& polygon : classifyRings(geometry)) { - // Optimize polygons with many interior rings for earcut tesselation. + // Optimize polygons with many interior rings for earcut tessellation. limitHoles(polygon, 500); const std::size_t totalVertices = totalVerticesCheck(polygon); diff --git a/src/mbgl/gfx/polyline_generator.cpp b/src/mbgl/gfx/polyline_generator.cpp index cd691cb5a..bdc863ead 100644 --- a/src/mbgl/gfx/polyline_generator.cpp +++ b/src/mbgl/gfx/polyline_generator.cpp @@ -338,7 +338,7 @@ void PolylineGenerator::generate(const GeometryCoordinates& coordinates offsetB = offset; } - // Close previous segement with bevel + // Close previous segment with bevel if (!startOfLine) { addCurrentVertex(*currentCoordinate, distance, diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp index ff6a159d4..ab2eb63fe 100644 --- a/src/mbgl/gl/context.cpp +++ b/src/mbgl/gl/context.cpp @@ -649,7 +649,7 @@ void Context::setCullFaceMode(const gfx::CullFaceMode& mode) { cullFace = mode.enabled; // These shouldn't need to be updated when face culling is disabled, but we - // might end up having the same isssues with Adreno 2xx GPUs as noted in + // might end up having the same issues with Adreno 2xx GPUs as noted in // Context::setDepthMode. cullFaceSide = mode.side; cullFaceWinding = mode.winding; diff --git a/src/mbgl/gl/renderer_backend.cpp b/src/mbgl/gl/renderer_backend.cpp index 3729d6b04..2cdd406eb 100644 --- a/src/mbgl/gl/renderer_backend.cpp +++ b/src/mbgl/gl/renderer_backend.cpp @@ -103,7 +103,7 @@ void registerTypes(gfx::ShaderRegistry& registry, const ProgramParameters& progr /// in the parameter pack and register it with the shader registry. /// Registration calls are wrapped in a lambda that throws on registration - /// failure, we shouldn't expect registration to faill unless the shader + /// failure, we shouldn't expect registration to fail unless the shader /// registry instance provided already has conflicting programs present. ( [&]() { diff --git a/src/mbgl/map/transform_state.cpp b/src/mbgl/map/transform_state.cpp index 73246f267..9dad9e333 100644 --- a/src/mbgl/map/transform_state.cpp +++ b/src/mbgl/map/transform_state.cpp @@ -162,7 +162,7 @@ void TransformState::getProjMatrix(mat4& projMatrix, uint16_t nearZ, bool aligne // Move the center of perspective to center of specified edgeInsets. // Values are in range [-1, 1] where the upper and lower range values - // position viewport center to the screen edges. This is overriden + // position viewport center to the screen edges. This is overridden // if using axonometric perspective (not in public API yet, Issue #11882). // TODO(astojilj): Issue #11882 should take edge insets into account, too. if (!axonometric) { diff --git a/src/mbgl/mtl/context.cpp b/src/mbgl/mtl/context.cpp index 00ec7b825..ece9c000b 100644 --- a/src/mbgl/mtl/context.cpp +++ b/src/mbgl/mtl/context.cpp @@ -283,7 +283,7 @@ const BufferResource& Context::getTileIndexBuffer() { const UniqueVertexBufferResource& Context::getEmptyVertexBuffer() { if (!emptyVertexBuffer) { - // This buffer is bound to vertex attribtue indexes when the uniforms are used instead and + // This buffer is bound to vertex attribute indexes when the uniforms are used instead and // shaders are expected not to access the attribute values, but Metal requires a binding. // This buffer could also hold a single default value applied for all vertices, in which case // it could not be shared (See `MTL::VertexStepFunctionConstant` in the vertex attribute diff --git a/src/mbgl/mtl/renderer_backend.cpp b/src/mbgl/mtl/renderer_backend.cpp index d9cba9158..70e0662ff 100644 --- a/src/mbgl/mtl/renderer_backend.cpp +++ b/src/mbgl/mtl/renderer_backend.cpp @@ -86,7 +86,7 @@ void registerTypes(gfx::ShaderRegistry& registry, const ProgramParameters& progr /// in the parameter pack and register it with the shader registry. /// Registration calls are wrapped in a lambda that throws on registration - /// failure, we shouldn't expect registration to faill unless the shader + /// failure, we shouldn't expect registration to fail unless the shader /// registry instance provided already has conflicting programs present. ( [&]() { diff --git a/src/mbgl/plugin/plugin_layer_factory.cpp b/src/mbgl/plugin/plugin_layer_factory.cpp index 00173f0c1..d70615561 100644 --- a/src/mbgl/plugin/plugin_layer_factory.cpp +++ b/src/mbgl/plugin/plugin_layer_factory.cpp @@ -12,7 +12,7 @@ namespace mbgl { namespace plugins { // This is really hacky, but wanted to do it here to discuss if the -// const can be removed from teh regular LayerTypeInfo +// const can be removed from the regular LayerTypeInfo struct NonConstLayerTypeInfo { const char* type; enum class Source { diff --git a/src/mbgl/programs/programs.cpp b/src/mbgl/programs/programs.cpp index 2aa093dff..178c78e22 100644 --- a/src/mbgl/programs/programs.cpp +++ b/src/mbgl/programs/programs.cpp @@ -29,7 +29,7 @@ void registerTypes(gfx::ShaderRegistry& registry, const ProgramParameters& progr /// in the parameter pack and register it with the shader registry. /// Registration calls are wrapped in a lambda that throws on registration - /// failure, we shouldn't expect registration to faill unless the shader + /// failure, we shouldn't expect registration to fail unless the shader /// registry instance provided already has conflicting programs present. ( [](bool expr) { diff --git a/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp b/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp index 2d64117fb..fba8d876e 100644 --- a/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp +++ b/src/mbgl/renderer/buckets/fill_extrusion_bucket.cpp @@ -63,7 +63,7 @@ void FillExtrusionBucket::addFeature(const GeometryTileFeature& feature, std::size_t index, const CanonicalTileID& canonical) { for (auto& polygon : classifyRings(geometry)) { - // Optimize polygons with many interior rings for earcut tesselation. + // Optimize polygons with many interior rings for earcut tessellation. limitHoles(polygon, 500); std::size_t totalVertices = 0; diff --git a/src/mbgl/renderer/paint_property_binder.hpp b/src/mbgl/renderer/paint_property_binder.hpp index d532a1e6b..9815aa2fd 100644 --- a/src/mbgl/renderer/paint_property_binder.hpp +++ b/src/mbgl/renderer/paint_property_binder.hpp @@ -134,7 +134,7 @@ std::array zoomInterpolatedAttributeValue(const std::array @@ -522,7 +522,7 @@ public: const CanonicalTileID&, const style::expression::Value&) override { if (!patternDependencies || patternDependencies->mid.empty()) { - // Unlike other propperties with expressions that evaluate to null, + // Unlike other properties with expressions that evaluate to null, // the default value for `*-pattern` properties is an empty string // and will not have a valid entry in patternPositions. We still // need to populate the attribute buffers to avoid crashes when we diff --git a/src/mbgl/renderer/render_layer.hpp b/src/mbgl/renderer/render_layer.hpp index 181f8cc30..361837254 100644 --- a/src/mbgl/renderer/render_layer.hpp +++ b/src/mbgl/renderer/render_layer.hpp @@ -295,7 +295,7 @@ protected: LayerPlacementData placementData; - // will need to be overriden to handle their activation. + // will need to be overridden to handle their activation. LayerGroupBasePtr layerGroup; // An optional tweaker that will update drawables diff --git a/src/mbgl/renderer/renderer_impl.cpp b/src/mbgl/renderer/renderer_impl.cpp index 5c1b3ad1f..1ba686915 100644 --- a/src/mbgl/renderer/renderer_impl.cpp +++ b/src/mbgl/renderer/renderer_impl.cpp @@ -29,7 +29,7 @@ #include #include /// Enable programmatic Metal frame captures for specific frame numbers. -/// Requries iOS 13 +/// Requires iOS 13 constexpr auto EnableMetalCapture = 0; constexpr auto CaptureFrameStart = 0; // frames are 0-based constexpr auto CaptureFrameCount = 1; diff --git a/src/mbgl/renderer/sources/render_image_source.cpp b/src/mbgl/renderer/sources/render_image_source.cpp index ef4c5f776..309f92c85 100644 --- a/src/mbgl/renderer/sources/render_image_source.cpp +++ b/src/mbgl/renderer/sources/render_image_source.cpp @@ -132,7 +132,7 @@ void RenderImageSource::update(Immutable baseImpl_, tileIds.push_back(tileCover[0]); bool hasVisibleTile = false; - // Add additional wrapped tile ids if neccessary + // Add additional wrapped tile ids if necessary Range zoomRange(0, zoom); auto idealTiles = util::tileCover({.transformState = transformState, .tileLodMinRadius = parameters.tileLodMinRadius, diff --git a/src/mbgl/shaders/gl/legacy/programs.cpp b/src/mbgl/shaders/gl/legacy/programs.cpp index 118b829e9..b4ca1516a 100644 --- a/src/mbgl/shaders/gl/legacy/programs.cpp +++ b/src/mbgl/shaders/gl/legacy/programs.cpp @@ -20,7 +20,7 @@ void registerTypes(gfx::ShaderRegistry& registry, const ProgramParameters& progr /// in the parameter pack and register it with the shader registry. /// Registration calls are wrapped in a lambda that throws on registration - /// failure, we shouldn't expect registration to faill unless the shader + /// failure, we shouldn't expect registration to fail unless the shader /// registry instance provided already has conflicting programs present. ( [](bool expr) { diff --git a/src/mbgl/style/expression/distance.cpp b/src/mbgl/style/expression/distance.cpp index e19e5cd2c..51de84691 100644 --- a/src/mbgl/style/expression/distance.cpp +++ b/src/mbgl/style/expression/distance.cpp @@ -878,7 +878,7 @@ using namespace mbgl::style::conversion; EvaluationResult Distance::evaluate(const EvaluationContext& params) const { if (!params.feature || !params.canonical) { return EvaluationError{ - "distance expression requirs valid feature and canonical " + "distance expression requires valid feature and canonical " "information."}; } auto geometryType = params.feature->getType(); diff --git a/src/mbgl/style/expression/formatted.cpp b/src/mbgl/style/expression/formatted.cpp index 2131ab600..49ae20273 100644 --- a/src/mbgl/style/expression/formatted.cpp +++ b/src/mbgl/style/expression/formatted.cpp @@ -112,7 +112,7 @@ std::optional Converter::operator()(const Convertible& val std::optional imageArg = toString(arrayMember(firstElement, 1)); if (!imageArg) { error.message = - "Serialized image section agument has to be of a " + "Serialized image section argument has to be of a " "String type."; return std::nullopt; } diff --git a/src/mbgl/style/layers/layer.cpp.ejs b/src/mbgl/style/layers/layer.cpp.ejs index 04438e8a3..c82abc93b 100644 --- a/src/mbgl/style/layers/layer.cpp.ejs +++ b/src/mbgl/style/layers/layer.cpp.ejs @@ -98,7 +98,7 @@ layerCapabilities['heatmap'] = defaults.require('Source') layerCapabilities['raster'] = defaults.require('Source').set('TileKind', 'Raster').finalize(); layerCapabilities['location-indicator'] = defaults.finalize(); -// Splits lines that are over 120 characters at the firts occurance of '='. +// Splits lines that are over 120 characters at the first occurrence of '='. const split120Line = line => { const ident = ' '; if (line.length + ident.length > 120) { diff --git a/src/mbgl/text/bidi.hpp b/src/mbgl/text/bidi.hpp index 7c00f18c9..51ac083a6 100644 --- a/src/mbgl/text/bidi.hpp +++ b/src/mbgl/text/bidi.hpp @@ -17,7 +17,7 @@ std::u16string applyArabicShaping(const std::u16string&); // StyledText pairs each code point in a string with an integer indicating // the styling options to use for rendering that code point -// The data structure is intended to accomodate the reordering/interleaving +// The data structure is intended to accommodate the reordering/interleaving // of formatting that can happen when BiDi rearranges inputs using StyledText = std::pair>; diff --git a/src/mbgl/text/collision_index.cpp b/src/mbgl/text/collision_index.cpp index c4d318087..b8e534187 100644 --- a/src/mbgl/text/collision_index.cpp +++ b/src/mbgl/text/collision_index.cpp @@ -55,7 +55,7 @@ float CollisionIndex::approximateTileDistance(const TileDistance& tileDistance, const float pixelsToTileUnits, const float cameraToAnchorDistance, const bool pitchWithMap) { - // This is a quick and dirty solution for chosing which collision circles to + // This is a quick and dirty solution for choosing which collision circles to // use (since collision circles are laid out in tile units). Ideally, I // think we should generate collision circles on the fly in viewport // coordinates at the time we do collision detection. diff --git a/src/mbgl/text/language_tag.hpp b/src/mbgl/text/language_tag.hpp index 9be357657..87b7bcfc9 100644 --- a/src/mbgl/text/language_tag.hpp +++ b/src/mbgl/text/language_tag.hpp @@ -14,7 +14,7 @@ MapLibre Style Spec specifies locales with BCP 47 Android and Intl.Collator implementations speak BCP 47 out of the box Darwin implementation requires translation to "Language Identifier" - We're OK with not supporting extensions, but we want to succesfully + We're OK with not supporting extensions, but we want to successfully parse any valid BCP 47 tag and get out the base language/script/region. Mozilla's version: diff --git a/src/mbgl/text/quads.cpp b/src/mbgl/text/quads.cpp index e5e7fde68..dc8066990 100644 --- a/src/mbgl/text/quads.cpp +++ b/src/mbgl/text/quads.cpp @@ -222,7 +222,7 @@ SymbolQuads getGlyphQuads(const Shaping& shapedText, for (const auto& positionedGlyph : line.positionedGlyphs) { if (!positionedGlyph.rect.hasArea()) continue; - // The rects have an addditional buffer that is not included in their size; + // The rects have an additional buffer that is not included in their size; const float glyphPadding = 1.0f; float rectBuffer = 3.0f + glyphPadding; float pixelRatio = 1.0f; diff --git a/src/mbgl/text/shaping.cpp b/src/mbgl/text/shaping.cpp index 066795f5b..d6a04c3c1 100644 --- a/src/mbgl/text/shaping.cpp +++ b/src/mbgl/text/shaping.cpp @@ -371,7 +371,7 @@ std::set determineLineBreaks(const TaggedString& logicalInput, std::list potentialBreaks; float currentX = 0; - // Find first occurance of zero width space (ZWSP) character. + // Find first occurrence of zero width space (ZWSP) character. const bool hasServerSuggestedBreaks = logicalInput.rawText().find_first_of(ZWSP) != std::string::npos; for (std::size_t i = 0; i < logicalInput.length(); i++) { diff --git a/src/mbgl/tile/geometry_tile.cpp b/src/mbgl/tile/geometry_tile.cpp index 620c16b7c..35d629709 100644 --- a/src/mbgl/tile/geometry_tile.cpp +++ b/src/mbgl/tile/geometry_tile.cpp @@ -539,7 +539,7 @@ void GeometryTile::querySourceFeatures(std::vector& result, const Sourc } for (const auto& sourceLayer : *options.sourceLayers) { - // Go throught all sourceLayers, if any + // Go through all sourceLayers, if any // to gather all the features auto layer = getData()->getLayer(sourceLayer); diff --git a/src/mbgl/util/chrono.cpp b/src/mbgl/util/chrono.cpp index 97fd04f82..67844fa89 100644 --- a/src/mbgl/util/chrono.cpp +++ b/src/mbgl/util/chrono.cpp @@ -27,7 +27,7 @@ std::string rfc1123(Timestamp timestamp) { // Buffer size 30 is OK assuming the year has 4 digits. However, In theory, // it might have more digits. Under gcc 8.3.0 with -Os optimization flag, // there is compiler warning complaining about the buffer size might be too - // small. Inceasing the buffer to 32 fixes the warning. + // small. Increasing the buffer to 32 fixes the warning. char buffer[32]; snprintf(buffer, 32, diff --git a/src/mbgl/util/mapbox.cpp b/src/mbgl/util/mapbox.cpp index fabff5d7d..554f64d73 100644 --- a/src/mbgl/util/mapbox.cpp +++ b/src/mbgl/util/mapbox.cpp @@ -75,7 +75,7 @@ std::map createTokenMap(const std::string& urlTemplate // --- extract token values // /tiles{path}/tiles.json in tiles/satellite/tiles.json - // e.g. path = /satelite + // e.g. path = /satellite std::regex tokenPattern(R"(\{domain\}|\{path\}|\{directory\}|\{filename\}|\{extension\})"); std::string templatePattern = std::regex_replace( urlTemplate, tokenPattern, "(.+)", std::regex_constants::match_any); diff --git a/src/mbgl/util/tile_cover_impl.cpp b/src/mbgl/util/tile_cover_impl.cpp index 377adfd0b..b41d15316 100644 --- a/src/mbgl/util/tile_cover_impl.cpp +++ b/src/mbgl/util/tile_cover_impl.cpp @@ -290,7 +290,7 @@ TileCover::Impl::Impl(int32_t z, const Geometry& geom, bool project) boundsMap = apply_visitor(toBoundsMap, geom); if (boundsMap.empty()) return; - // Iniitalize the active edge table, and current row span + // Initialize the active edge table, and current row span currentBounds = boundsMap.begin(); tileY = 0; nextRow(); diff --git a/src/mbgl/util/tile_cover_impl.hpp b/src/mbgl/util/tile_cover_impl.hpp index af48923bc..f61467c0b 100644 --- a/src/mbgl/util/tile_cover_impl.hpp +++ b/src/mbgl/util/tile_cover_impl.hpp @@ -60,7 +60,7 @@ struct Bound { }; // Implements a modified scan-line algorithm to provide a streaming interface -// for tile cover on arbitrary shapes. A `BoundsMap` is genereted from the input +// for tile cover on arbitrary shapes. A `BoundsMap` is generated from the input // geometry where each tuple indicates the set of Bounds that start at a y tile // coordinate. Each bound represents a chain of edges from a local y-minima to a // local y-maxima. For each row, the activeBounds list aggregates all bounds diff --git a/src/mbgl/util/url.hpp b/src/mbgl/util/url.hpp index 04ef46762..dd18b643b 100644 --- a/src/mbgl/util/url.hpp +++ b/src/mbgl/util/url.hpp @@ -9,7 +9,7 @@ namespace util { std::string percentEncode(const std::string&); std::string percentDecode(const std::string&); -// Class that holds position + lenth pairs for scheme, domain, path + query string of a URL. +// Class that holds position + length pairs for scheme, domain, path + query string of a URL. class URL { public: using Segment = std::pair; // position, length @@ -22,7 +22,7 @@ public: URL(const std::string&); }; -// Class that holds position + lenth pairs for directory, extension, and +// Class that holds position + length pairs for directory, extension, and // filename of a path. The extension will contain the preceding ., and // optionally a preceding @2x specifier. The filename will not contain the file // extension. diff --git a/src/mbgl/vulkan/renderer_backend.cpp b/src/mbgl/vulkan/renderer_backend.cpp index 05ed35d4d..dc92304c4 100644 --- a/src/mbgl/vulkan/renderer_backend.cpp +++ b/src/mbgl/vulkan/renderer_backend.cpp @@ -675,7 +675,7 @@ void registerTypes(gfx::ShaderRegistry& registry, const ProgramParameters& progr /// in the parameter pack and register it with the shader registry. // Registration calls are wrapped in a lambda that throws on registration - // failure, we shouldn't expect registration to faill unless the shader + // failure, we shouldn't expect registration to fail unless the shader // registry instance provided already has conflicting programs present. ( [&]() { diff --git a/test/api/annotations.test.cpp b/test/api/annotations.test.cpp index c2b685aa6..330e770ea 100644 --- a/test/api/annotations.test.cpp +++ b/test/api/annotations.test.cpp @@ -476,7 +476,7 @@ TEST(Annotations, ViewFrustumCulling) { // Important premise of this test is "static const float viewportPadding = // 100;" as defined in collision_index.cpp: tests using edge insets are - // writen so that padding is 128 (half of viewSize width). If increasing + // written so that padding is 128 (half of viewSize width). If increasing // viewportPadding, increase the padding in test cases below. AnnotationTest test; diff --git a/test/src/mbgl/test/stub_layer_observer.hpp b/test/src/mbgl/test/stub_layer_observer.hpp index 36a6d3137..bcd587576 100644 --- a/test/src/mbgl/test/stub_layer_observer.hpp +++ b/test/src/mbgl/test/stub_layer_observer.hpp @@ -7,7 +7,7 @@ using namespace mbgl::style; /** * An implementation of style::LayerObserver that forwards all methods to - * dynamically-settable lambas. + * dynamically-settable lambdas. */ class StubLayerObserver : public style::LayerObserver { public: diff --git a/test/src/mbgl/test/stub_tile_observer.hpp b/test/src/mbgl/test/stub_tile_observer.hpp index 57237c4c7..bc4f669b9 100644 --- a/test/src/mbgl/test/stub_tile_observer.hpp +++ b/test/src/mbgl/test/stub_tile_observer.hpp @@ -6,7 +6,7 @@ using namespace mbgl; /** * An implementation of TileObserver that forwards all methods to - * dynamically-settable lambas. + * dynamically-settable lambdas. */ class StubTileObserver : public TileObserver { public: diff --git a/test/storage/offline_database.test.cpp b/test/storage/offline_database.test.cpp index 57a497c0a..0abfa2a25 100644 --- a/test/storage/offline_database.test.cpp +++ b/test/storage/offline_database.test.cpp @@ -159,7 +159,7 @@ TEST(OfflineDatabase, TEST_REQUIRES_WRITE(CreateFail)) { } // Now, we're "freeing up" some space on the disk, and try to insert and - // query again. This time, we should be opening the datbase, creating the + // query again. This time, we should be opening the database, creating the // schema, and writing the data so that we can retrieve it again. fs.allowFileCreate(true); for (const auto& res : {fixture::resource, fixture::tile}) { diff --git a/test/style/source.test.cpp b/test/style/source.test.cpp index 181340d35..69e649a98 100644 --- a/test/style/source.test.cpp +++ b/test/style/source.test.cpp @@ -1001,7 +1001,7 @@ TEST(Source, GeoJSONSourceTilesAfterDataReset) { source.setGeoJSONData(nullptr); static_cast(renderSource).update(source.baseImpl, layers, true, true, test.tileParameters()); - EXPECT_FALSE(renderSource.isLoaded()); // Tiles remain in continous mode. + EXPECT_FALSE(renderSource.isLoaded()); // Tiles remain in continuous mode. source.setGeoJSONData(geoJSONData); static_cast(renderSource).update(source.baseImpl, layers, true, true, test.tileParameters()); diff --git a/test/text/glyph_manager.test.cpp b/test/text/glyph_manager.test.cpp index 176894225..1d13d893e 100644 --- a/test/text/glyph_manager.test.cpp +++ b/test/text/glyph_manager.test.cpp @@ -380,6 +380,9 @@ TEST(GlyphManager, LocalCJKGlyphPrefersLocalRasterizationOverRange) { ASSERT_EQ(testPositions.size(), 1u); ASSERT_EQ(testPositions.count(u'々'), 1u); + // Katakana letter te, should be locally rasterized + // instead of using the glyph received from the range + // for the ideagraphic mark test.glyphManager.getGlyphs(test.requestor, GlyphDependencies{.glyphs = {{{{"Test Stack"}}, {u'テ'}}}, // 0x30c6 .shapes = {}}, diff --git a/test/util/async_task.test.cpp b/test/util/async_task.test.cpp index 1fc7acf53..00c43a91e 100644 --- a/test/util/async_task.test.cpp +++ b/test/util/async_task.test.cpp @@ -169,8 +169,8 @@ TEST(AsyncTask, scheduleAndReplyValue) { loop.stop(); }; - std::shared_ptr sheduler = Scheduler::GetBackground(); - sheduler->scheduleAndReplyValue(util::SimpleIdentity::Empty, runInBackground, onResult); + std::shared_ptr scheduler = Scheduler::GetBackground(); + scheduler->scheduleAndReplyValue(util::SimpleIdentity::Empty, runInBackground, onResult); loop.run(); } @@ -197,11 +197,11 @@ TEST(AsyncTask, SequencedScheduler) { loop.stop(); }; - std::shared_ptr sheduler = Scheduler::GetSequenced(); + std::shared_ptr scheduler = Scheduler::GetSequenced(); - sheduler->schedule(first); - sheduler->schedule(second); - sheduler->schedule(third); + scheduler->schedule(first); + scheduler->schedule(second); + scheduler->schedule(third); loop.run(); }