diff --git a/scripts/update_dependencies.sh b/scripts/update_dependencies.sh index d9cebbe4b..8a62b1d43 100755 --- a/scripts/update_dependencies.sh +++ b/scripts/update_dependencies.sh @@ -10,7 +10,7 @@ set -o nounset # http://git.661346.n2.nabble.com/subtree-merges-lose-prefix-after-rebase-td7332850.html OSMIUM_PATH="osmcode/libosmium" -OSMIUM_TAG=v2.14.0 +OSMIUM_TAG=v2.20.0 SOL_PATH="ThePhD/sol2" SOL_TAG=v3.3.0 diff --git a/third_party/libosmium/.clang-tidy b/third_party/libosmium/.clang-tidy index 466adca34..66e6dd078 100644 --- a/third_party/libosmium/.clang-tidy +++ b/third_party/libosmium/.clang-tidy @@ -1,5 +1,5 @@ --- -Checks: '*,-abseil-string-find-str-contains,-altera-*,-android-cloexec-*,-bugprone-branch-clone,-bugprone-easily-swappable-parameters,-bugprone-macro-parentheses,-cert-dcl21-cpp,-cert-err58-cpp,-clang-analyzer-optin.cplusplus.VirtualCall,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-macro-usage,-cppcoreguidelines-non-private-member-variables-in-classes,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-vararg,-fuchsia-*,-google-runtime-references,-hicpp-avoid-c-arrays,-hicpp-invalid-access-moved,-hicpp-no-array-decay,-hicpp-no-assembler,-hicpp-vararg,-llvmlibc-*,-llvm-qualified-auto,-misc-macro-parentheses,-misc-non-private-member-variables-in-classes,-misc-no-recursion,-misc-unused-parameters,-modernize-avoid-c-arrays,-modernize-make-unique,-modernize-raw-string-literal,-modernize-use-trailing-return-type,-readability-avoid-const-params-in-decls,-readability-function-cognitive-complexity,-readability-identifier-length,-readability-implicit-bool-cast,-readability-implicit-bool-conversion,-readability-magic-numbers,-readability-qualified-auto' +Checks: '*,-abseil-string-find-str-contains,-altera-*,-android-cloexec-*,-bugprone-branch-clone,-bugprone-easily-swappable-parameters,-bugprone-macro-parentheses,-cert-dcl21-cpp,-cert-err58-cpp,-clang-analyzer-optin.cplusplus.VirtualCall,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-macro-usage,-cppcoreguidelines-non-private-member-variables-in-classes,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-vararg,-fuchsia-*,-google-runtime-references,-hicpp-avoid-c-arrays,-hicpp-invalid-access-moved,-hicpp-no-array-decay,-hicpp-no-assembler,-hicpp-vararg,-llvmlibc-*,-llvm-qualified-auto,-misc-macro-parentheses,-misc-non-private-member-variables-in-classes,-misc-no-recursion,-misc-unused-parameters,-modernize-avoid-c-arrays,-modernize-make-unique,-modernize-raw-string-literal,-modernize-use-trailing-return-type,-readability-avoid-const-params-in-decls,-readability-convert-member-functions-to-static,-readability-function-cognitive-complexity,-readability-identifier-length,-readability-implicit-bool-cast,-readability-implicit-bool-conversion,-readability-magic-numbers,-readability-qualified-auto' # # For a list of check options, see: # https://clang.llvm.org/extra/clang-tidy/checks/list.html @@ -137,6 +137,9 @@ Checks: '*,-abseil-string-find-str-contains,-altera-*,-android-cloexec-*,-bugpro # This is header only library, so the declaration and implementation are # often the same and we want to have the const in implementations. # +# readability-convert-member-functions-to-static +# Reports too many false positives +# # readability-function-cognitive-complexity # Sometimes the large functions are needed. # diff --git a/third_party/libosmium/.github/actions/cmake-windows/action.yml b/third_party/libosmium/.github/actions/cmake-windows/action.yml index 1812fac8e..2eafcb796 100644 --- a/third_party/libosmium/.github/actions/cmake-windows/action.yml +++ b/third_party/libosmium/.github/actions/cmake-windows/action.yml @@ -7,7 +7,13 @@ runs: run: mkdir build shell: bash - name: Configure - run: cmake -LA .. -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DBUILD_HEADERS=OFF -DBUILD_BENCHMARKS=ON -DOsmium_DEBUG=TRUE -DPROTOZERO_INCLUDE_DIR=${GITHUB_WORKSPACE}/../protozero/include + run: | + cmake -LA .. \ + -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake \ + -DBUILD_HEADERS=OFF \ + -DBUILD_BENCHMARKS=ON \ + -DOsmium_DEBUG=TRUE \ + -DPROTOZERO_INCLUDE_DIR=${GITHUB_WORKSPACE}/../protozero/include shell: bash working-directory: build diff --git a/third_party/libosmium/.github/actions/install-ubuntu/action.yml b/third_party/libosmium/.github/actions/install-ubuntu/action.yml index b11ee3b30..1711847c0 100644 --- a/third_party/libosmium/.github/actions/install-ubuntu/action.yml +++ b/third_party/libosmium/.github/actions/install-ubuntu/action.yml @@ -5,7 +5,7 @@ runs: steps: - name: Install packages run: | - sudo apt-get update -q + sudo apt-get update -qq sudo apt-get install -yq \ doxygen \ libboost-dev \ @@ -16,8 +16,5 @@ runs: libsparsehash-dev \ ruby-json \ spatialite-bin - test "$CC" = clang-6.0 && sudo apt-get install -yq --no-install-suggests --no-install-recommends clang-6.0 - test "$CC" = clang-8 && sudo apt-get install -yq --no-install-suggests --no-install-recommends clang-8 - test "$CC" = clang-13 && sudo apt-get install -yq --no-install-suggests --no-install-recommends clang-13 shell: bash diff --git a/third_party/libosmium/.github/workflows/ci.yml b/third_party/libosmium/.github/workflows/ci.yml index 73f6991b9..95469979f 100644 --- a/third_party/libosmium/.github/workflows/ci.yml +++ b/third_party/libosmium/.github/workflows/ci.yml @@ -3,14 +3,13 @@ name: CI on: [ push, pull_request ] jobs: - linux: runs-on: ubuntu-latest timeout-minutes: 40 strategy: fail-fast: false matrix: - name: [Ubuntu-18, Ubuntu-20, Ubuntu-21, Debian-9, Debian-10, Debian-11, Debian-Testing, Debian-Experimental, Fedora-34] + name: [Ubuntu-18, Ubuntu-20, Ubuntu-22, Debian-10, Debian-11, Debian-12, Debian-Testing, Debian-Experimental, Fedora-35, Fedora-36, Fedora-37, Fedora-38] build_type: [Dev] cpp_compiler: [g++] cpp_version: [c++11] @@ -19,122 +18,136 @@ jobs: # Uses gcc 7.5.0, clang 6.0.0, cmake 3.10.2 image: "ubuntu:18.04" ubuntu: 18 - installer: apt - name: Ubuntu-20 # Uses gcc 9.3.0, clang 10.0.0, cmake 3.16.3 image: "ubuntu:20.04" ubuntu: 20 - installer: apt - - name: Ubuntu-21 - # Uses gcc 10.3.0, clang, 12.0.0, cmake 3.18.4 - image: "ubuntu:21.04" - ubuntu: 21 - installer: apt - - name: Debian-9 - # Uses gcc 6.3.0, clang 3.8.1, cmake 3.7.2 - image: "debian:stretch" - installer: apt + - name: Ubuntu-22 + # Uses gcc 12.2.0, clang 15.0.7, cmake 3.24.2 + image: "ubuntu:22.04" + ubuntu: 22 + CXXFLAGS: -Wno-stringop-overread - name: Debian-10 # Uses gcc 8.3.0, clang 7.0.1, cmake 3.13.4 image: "debian:buster" - installer: apt - name: Debian-11 # Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4 image: "debian:bullseye" - installer: apt - name: Debian-11 - # Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4 image: "debian:bullseye" - installer: apt cpp_version: c++17 - name: Debian-11 - # Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4 image: "debian:bullseye" - installer: apt cpp_version: c++20 - name: Debian-11 - # Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4 image: "debian:bullseye" - installer: apt + c_compiler: clang + cpp_compiler: clang++ + - name: Debian-11 + image: "debian:bullseye" c_compiler: clang cpp_compiler: clang++ cpp_version: c++17 - name: Debian-11 - # Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4 image: "debian:bullseye" - installer: apt c_compiler: clang cpp_compiler: clang++ cpp_version: c++20 - name: Debian-11 - # Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4 image: "debian:bullseye" - installer: apt build_type: RelWithDebInfo - name: Debian-11 - # Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4 image: "debian:bullseye" - installer: apt c_compiler: clang cpp_compiler: clang++ - - name: Debian-11 - # Uses gcc 10.2.1, clang 11.0.1, cmake 3.18.4 - image: "debian:bullseye" - installer: apt - c_compiler: clang - cpp_compiler: clang++ - CXXFLAGS: -fsanitize=address,undefined,integer -fno-sanitize-recover=all -fno-omit-frame-pointer - LDFLAGS: -fsanitize=address,undefined,integer - - name: Debian-Testing - # Uses gcc 10.3.0, clang 11.1.0, cmake 3.21.3 - image: "debian:testing" - installer: apt + CXXFLAGS: -fsanitize=address,undefined -fno-sanitize-recover=all -fno-omit-frame-pointer + LDFLAGS: -fsanitize=address,undefined + - name: Debian-12 + # Uses gcc 12.2.0, clang 15.0.6, cmake 3.25.1 + image: "debian:bookworm" CXXFLAGS: -Wno-stringop-overread + - name: Debian-12 + image: "debian:bookworm" + cpp_version: c++17 + CXXFLAGS: -Wno-stringop-overread + - name: Debian-12 + image: "debian:bookworm" + cpp_version: c++20 + CXXFLAGS: -Wno-stringop-overread + - name: Debian-12 + image: "debian:bookworm" + c_compiler: clang + cpp_compiler: clang++ + - name: Debian-12 + image: "debian:bookworm" + c_compiler: clang + cpp_compiler: clang++ + cpp_version: c++17 + - name: Debian-12 + image: "debian:bookworm" + c_compiler: clang + cpp_compiler: clang++ + cpp_version: c++20 + - name: Debian-12 + image: "debian:bookworm" + build_type: RelWithDebInfo + CXXFLAGS: -Wno-stringop-overread + - name: Debian-12 + image: "debian:bookworm" + c_compiler: clang + cpp_compiler: clang++ + CXXFLAGS: -fsanitize=address,undefined -fno-sanitize-recover=all -fno-omit-frame-pointer + LDFLAGS: -fsanitize=address,undefined + - name: Debian-Testing + image: "debian:testing" + CXXFLAGS: -Wno-stringop-overread -Wno-dangling-reference - name: Debian-Testing - # Uses gcc 10.3.0, clang 11.1.0, cmake 3.21.3 image: "debian:testing" - installer: apt c_compiler: clang cpp_compiler: clang++ - name: Debian-Experimental - # Uses gcc 11, clang 14, cmake 3.21.3 image: "debian:experimental" - installer: apt - CXXFLAGS: -Wno-stringop-overread + CXXFLAGS: -Wno-stringop-overread -Wno-dangling-reference - name: Debian-Experimental - # Uses gcc 11, clang 14, cmake 3.21.3 image: "debian:experimental" - installer: apt - c_compiler: clang-14 - cpp_compiler: clang++-14 - - name: Fedora-34 - # Uses gcc 11.2.1, clang 12.0.1, cmake 3.20.5 - image: "fedora:34" - installer: dnf - CXXFLAGS: -Wno-stringop-overread + c_compiler: clang + cpp_compiler: clang++ - name: Fedora-35 # Uses gcc 11.2.1, clang 12.0.1, cmake 3.20.5 image: "fedora:35" - installer: dnf CXXFLAGS: -Wno-stringop-overread + - name: Fedora-36 + # Uses gcc 12.2.0, clang 14.0.5, cmake 3.24.2 + image: "fedora:36" + CXXFLAGS: -Wno-stringop-overread + - name: Fedora-37 + # Uses gcc 12.3.1, clang 15.0.7, cmake 3.26.4 + image: "fedora:37" + CXXFLAGS: -Wno-stringop-overread + - name: Fedora-38 + # Uses gcc 13.0.1, clang 16.0.5, cmake 3.26.4 + image: "fedora:38" + CXXFLAGS: -Wno-stringop-overread -Wno-dangling-reference container: image: ${{ matrix.image }} env: LANG: en_US.UTF-8 BUILD_TYPE: ${{ matrix.build_type }} - CXXFLAGS: ${{ matrix.CXXFLAGS }} - LDFLAGS: ${{ matrix.LDFLAGS }} CC: ${{ matrix.c_compiler }} CXX: ${{ matrix.cpp_compiler }} + CXXFLAGS: ${{ matrix.CXXFLAGS }} + LDFLAGS: ${{ matrix.LDFLAGS }} CPP_VERSION: ${{ matrix.cpp_version }} WITH_PROJ: ON + APT_LISTCHANGES_FRONTEND: none + DEBIAN_FRONTEND: noninteractive steps: - name: Prepare container (apt) + shell: bash + if: startsWith(matrix.image, 'debian:') || startsWith(matrix.image, 'ubuntu:') run: | - export APT_LISTCHANGES_FRONTEND=none - export DEBIAN_FRONTEND=noninteractive apt-get update -qq - apt-get install -y \ + apt-get install -yq \ clang \ cmake \ doxygen \ @@ -154,16 +167,13 @@ jobs: ruby-json \ spatialite-bin \ zlib1g-dev - shell: bash - if: matrix.installer == 'apt' - name: Install compiler shell: bash - run: | - export APT_LISTCHANGES_FRONTEND=none - export DEBIAN_FRONTEND=noninteractive - apt-get install -y clang-14 if: matrix.cpp_compiler == 'clang++-14' + run: apt-get install -yq clang-14 - name: Prepare container (dnf) + shell: bash + if: startsWith(matrix.image, 'fedora:') run: | dnf install --quiet --assumeyes \ boost-devel \ @@ -185,9 +195,7 @@ jobs: sparsehash-devel \ spatialite-tools \ zlib-devel - shell: bash - if: matrix.installer == 'dnf' - # Use v1 of checkout because v2 doesn't work with submodules + # Use v1 of checkout because v3 doesn't work with submodules - uses: actions/checkout@v1 with: submodules: true @@ -197,21 +205,23 @@ jobs: - uses: ./.github/actions/ctest ubuntu-latest: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 timeout-minutes: 40 env: - CC: clang-13 - CXX: clang++-13 + CC: clang-15 + CXX: clang++-15 BUILD_TYPE: Dev WITH_PROJ: ON steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - name: Install new clang run: | - wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - sudo add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main' + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/llvm-snapshot.asc + sudo add-apt-repository 'deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main' + sudo apt-get update -qq + sudo apt-get install -yq clang-15 shell: bash - uses: ./.github/actions/install-ubuntu - uses: ./.github/actions/install-protozero @@ -219,16 +229,27 @@ jobs: - uses: ./.github/actions/build - uses: ./.github/actions/ctest - macos10-dev: - runs-on: macos-10.15 + macos: timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + os: + - "macos-11" + - "macos-12" + - "macos-13" + build_type: [Dev] + include: + - os: "macos-12" + build_type: Release + runs-on: ${{ matrix.os }} env: CC: clang CXX: clang++ - BUILD_TYPE: Dev + BUILD_TYPE: ${{ matrix.build_type }} WITH_PROJ: OFF steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - uses: ./.github/actions/install-macos @@ -237,47 +258,17 @@ jobs: - uses: ./.github/actions/build - uses: ./.github/actions/ctest - macos11-dev: - runs-on: macos-11 - timeout-minutes: 60 - env: - CC: clang - CXX: clang++ - BUILD_TYPE: Dev - WITH_PROJ: OFF - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - uses: ./.github/actions/install-macos - - uses: ./.github/actions/install-protozero - - uses: ./.github/actions/cmake - - uses: ./.github/actions/build - - uses: ./.github/actions/ctest - - macos11-release: - runs-on: macos-11 - timeout-minutes: 60 - env: - CC: clang - CXX: clang++ - BUILD_TYPE: Release - WITH_PROJ: OFF - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - uses: ./.github/actions/install-macos - - uses: ./.github/actions/install-protozero - - uses: ./.github/actions/cmake - - uses: ./.github/actions/build - - uses: ./.github/actions/ctest - - windows-2019-minimal: - runs-on: windows-2019 + windows-minimal: timeout-minutes: 40 + strategy: + fail-fast: false + matrix: + os: + - windows-2019 + - windows-2022 + runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - uses: ./.github/actions/install-windows @@ -289,7 +280,7 @@ jobs: windows-2019-full: runs-on: windows-2019 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true - uses: ./.github/actions/install-windows @@ -301,16 +292,3 @@ jobs: - uses: ./.github/actions/build-windows - uses: ./.github/actions/ctest-windows - windows-2022-minimal: - runs-on: windows-2022 - timeout-minutes: 40 - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - uses: ./.github/actions/install-windows - - uses: ./.github/actions/install-protozero - - uses: ./.github/actions/cmake-windows - - uses: ./.github/actions/build-windows - - uses: ./.github/actions/ctest-windows - diff --git a/third_party/libosmium/.github/workflows/clang-tidy.yml b/third_party/libosmium/.github/workflows/clang-tidy.yml index 4328b5e81..a6c0b3359 100644 --- a/third_party/libosmium/.github/workflows/clang-tidy.yml +++ b/third_party/libosmium/.github/workflows/clang-tidy.yml @@ -3,7 +3,6 @@ name: clang-tidy on: workflow_dispatch jobs: - clang-tidy: runs-on: ubuntu-latest strategy: @@ -14,9 +13,9 @@ jobs: - image: "debian:bullseye" clang: 11 - image: "debian:testing" - clang: 12 + clang: 15 - image: "debian:experimental" - clang: 14 + clang: 15 container: image: ${{ matrix.image }} env: @@ -25,29 +24,29 @@ jobs: CXX: clang++-${{ matrix.clang }} CPP_VERSION: c++11 WITH_PROJ: ON + APT_LISTCHANGES_FRONTEND: none + DEBIAN_FRONTEND: noninteractive steps: - name: Prepare container (apt) run: | - export APT_LISTCHANGES_FRONTEND=none - export DEBIAN_FRONTEND=noninteractive apt-get update -qq - apt-get install -y \ - clang-${{ matrix.clang }} \ - clang-tidy-${{ matrix.clang }} \ - cmake \ - git \ - libboost-dev \ - libbz2-dev \ - libexpat1-dev \ - libgdal-dev \ - libgeos++-dev \ - liblz4-dev \ - libproj-dev \ - libsparsehash-dev \ - make \ - zlib1g-dev + apt-get install -yq \ + clang-${{ matrix.clang }} \ + clang-tidy-${{ matrix.clang }} \ + cmake \ + git \ + libboost-dev \ + libbz2-dev \ + libexpat1-dev \ + libgdal-dev \ + libgeos++-dev \ + liblz4-dev \ + libproj-dev \ + libsparsehash-dev \ + make \ + zlib1g-dev shell: bash - # Use v1 of checkout because v2 doesn't work with submodules + # Use v1 of checkout because v3 doesn't work with submodules - uses: actions/checkout@v1 with: submodules: true @@ -58,7 +57,7 @@ jobs: shell: bash working-directory: build - name: Upload Log - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: always() with: name: clang-tidy-${{ matrix.clang }}-log diff --git a/third_party/libosmium/.ycm_extra_conf.py b/third_party/libosmium/.ycm_extra_conf.py deleted file mode 100644 index a89927357..000000000 --- a/third_party/libosmium/.ycm_extra_conf.py +++ /dev/null @@ -1,53 +0,0 @@ -#----------------------------------------------------------------------------- -# -# Configuration for YouCompleteMe Vim plugin -# -# https://valloric.github.io/YouCompleteMe/ -# -#----------------------------------------------------------------------------- - -from os.path import realpath, dirname - -basedir = dirname(realpath(__file__)) - -# some default flags -# for more information install clang-3.2-doc package and -# check UsersManual.html -flags = [ -'-Werror', -'-Wall', -'-Wextra', -'-pedantic', -'-Wno-return-type', -'-Wno-unused-parameter', -'-Wno-unused-variable', - -'-std=c++11', - -# '-x' and 'c++' also required -# use 'c' for C projects -'-x', -'c++', - -# workaround for https://github.com/Valloric/YouCompleteMe/issues/303 -# also see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=800618 -'-isystem', -'/usr/lib/ycmd/clang_includes/', - -# libosmium include dirs -'-I%s/include' % basedir, -'-I%s/test/include' % basedir, -'-I%s/test/data-test/include' % basedir, - -# include third party libraries -'-I/usr/include/gdal', -] - -# youcompleteme is calling this function to get flags -# You can also set database for flags. Check: JSONCompilationDatabase.html in -# clang-3.2-doc package -def FlagsForFile( filename ): - return { - 'flags': flags, - 'do_cache': True - } diff --git a/third_party/libosmium/CHANGELOG.md b/third_party/libosmium/CHANGELOG.md index 1c2fd6639..231f3a25d 100644 --- a/third_party/libosmium/CHANGELOG.md +++ b/third_party/libosmium/CHANGELOG.md @@ -12,6 +12,38 @@ This project adheres to [Semantic Versioning](https://semver.org/). ### Fixed +## [2.20.0] - 2023-09-20 + +### Changed + +* Optionally allow fractional seconds in timestamps in OSM files. +* Enable `posix_fadvise` usage on FreeBSD. +* Make parsing PBFs a bit less picky. +* Various small code cleanups. + +### Fixed + +* Don't use class template arguments on `GeometryFactory` constructor + definition. + +## [2.19.0] - 2023-01-19 + +### Changed + +* Mark RapidJSON support as deprecated. +* Update included Catch to v2.13.10. +* Remove deprecated BoolVector class. +* Remove deprecated NWRIdSet class. +* Remove deprecated AssemblerConfig constructor. +* Print start of offending string in overlong string exception. +* Implement `set_thread_name()` on FreeBSD. +* Some small code cleanups. + +### Fixed + +* Fix return type in `MembersDatabaseCommon::count_not_removed()`. +* Make bzip2 unit tests pass on musl-based systems. +* Fix bug in members database test case. ## [2.18.0] - 2022-02-07 @@ -1253,7 +1285,9 @@ long time. These will not be part of the next version of libosmium: Doxygen (up to version 1.8.8). This version contains a workaround to fix this. -[unreleased]: https://github.com/osmcode/libosmium/compare/v2.18.0...HEAD +[unreleased]: https://github.com/osmcode/libosmium/compare/v2.20.0...HEAD +[2.20.0]: https://github.com/osmcode/libosmium/compare/v2.19.0...v2.20.0 +[2.19.0]: https://github.com/osmcode/libosmium/compare/v2.18.9...v2.19.0 [2.18.0]: https://github.com/osmcode/libosmium/compare/v2.17.3...v2.18.0 [2.17.3]: https://github.com/osmcode/libosmium/compare/v2.17.2...v2.17.3 [2.17.2]: https://github.com/osmcode/libosmium/compare/v2.17.1...v2.17.2 diff --git a/third_party/libosmium/CMakeLists.txt b/third_party/libosmium/CMakeLists.txt index 11d756692..c9c15bafa 100644 --- a/third_party/libosmium/CMakeLists.txt +++ b/third_party/libosmium/CMakeLists.txt @@ -39,7 +39,7 @@ set(CMAKE_CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo;MinSizeRel;Dev;Cover project(libosmium) set(LIBOSMIUM_VERSION_MAJOR 2) -set(LIBOSMIUM_VERSION_MINOR 18) +set(LIBOSMIUM_VERSION_MINOR 20) set(LIBOSMIUM_VERSION_PATCH 0) set(LIBOSMIUM_VERSION @@ -427,7 +427,7 @@ endif() # #----------------------------------------------------------------------------- message(STATUS "Looking for clang-tidy") -find_program(CLANG_TIDY NAMES clang-tidy clang-tidy-14 clang-tidy-13 clang-tidy-12 clang-tidy-11) +find_program(CLANG_TIDY NAMES clang-tidy clang-tidy-16 clang-tidy-15 clang-tidy-14 clang-tidy-13 clang-tidy-12 clang-tidy-11) if(CLANG_TIDY) message(STATUS "Looking for clang-tidy - found ${CLANG_TIDY}") diff --git a/third_party/libosmium/NOTES_FOR_DEVELOPERS.md b/third_party/libosmium/NOTES_FOR_DEVELOPERS.md index 9bc9a5004..f00f61b40 100644 --- a/third_party/libosmium/NOTES_FOR_DEVELOPERS.md +++ b/third_party/libosmium/NOTES_FOR_DEVELOPERS.md @@ -136,8 +136,7 @@ directory, some data tests in `test/osm-testdata` and tests of the examples in `test/examples`. They are built by the default cmake config. Run `ctest` to run them. We can always use more tests. -Tests are run automatically using Github Actions (Linux/macOS) and Appveyor -(Windows) services. +Tests are run automatically using Github Actions. ## Documenting the code diff --git a/third_party/libosmium/README.md b/third_party/libosmium/README.md index 7430673d0..4d73ed7a8 100644 --- a/third_party/libosmium/README.md +++ b/third_party/libosmium/README.md @@ -7,8 +7,6 @@ A fast and flexible C++ library for working with OpenStreetMap data. Libosmium works on Linux, macOS and Windows. [![Github Build Status](https://github.com/osmcode/libosmium/workflows/CI/badge.svg?branch=master)](https://github.com/osmcode/libosmium/actions) -[![Appveyor Build status](https://ci.appveyor.com/api/projects/status/yy099a4vxcb604rn/branch/master?svg=true)](https://ci.appveyor.com/project/lonvia/libosmium-eq41p/branch/master) -[![Coverage Status](https://codecov.io/gh/osmcode/libosmium/branch/master/graph/badge.svg)](https://codecov.io/gh/osmcode/libosmium) [![Packaging status](https://repology.org/badge/tiny-repos/libosmium.svg)](https://repology.org/metapackage/libosmium) Please see the [Libosmium manual](https://osmcode.org/libosmium/manual.html) @@ -17,9 +15,8 @@ for more details than this README can provide. ## Prerequisites -Because Libosmium uses many C++11 features you need a modern compiler and -standard C++ library. Osmium needs at least GCC 4.8 or clang (LLVM) 3.4. -(Some parts may work with older versions.) +You need a C++11 compiler and standard C++ library. Osmium needs at least GCC +4.8 or clang (LLVM) 3.4. (Some parts may work with older versions.) Different parts of Libosmium (and the applications built on top of it) need different libraries. You DO NOT NEED to install all of them, just install those @@ -88,13 +85,6 @@ See the for instructions. -## Switching from the old Osmium - -If you have been using the old version of Osmium at -https://github.com/joto/osmium you might want to read about the [changes -needed](https://osmcode.org/libosmium/manual.html#changes-from-old-versions-of-osmium). - - ## License Libosmium is available under the Boost Software License. See LICENSE. diff --git a/third_party/libosmium/benchmarks/osmium_benchmark_static_vs_dynamic_index.cpp b/third_party/libosmium/benchmarks/osmium_benchmark_static_vs_dynamic_index.cpp index c2b9c145e..e8d383867 100644 --- a/third_party/libosmium/benchmarks/osmium_benchmark_static_vs_dynamic_index.cpp +++ b/third_party/libosmium/benchmarks/osmium_benchmark_static_vs_dynamic_index.cpp @@ -47,7 +47,7 @@ int main(int argc, char* argv[]) { try { const std::string input_filename{argv[1]}; - osmium::memory::Buffer buffer{osmium::io::read_file(input_filename)}; + const osmium::memory::Buffer buffer{osmium::io::read_file(input_filename)}; const auto& map_factory = osmium::index::MapFactory::instance(); diff --git a/third_party/libosmium/benchmarks/osmium_benchmark_write_pbf.cpp b/third_party/libosmium/benchmarks/osmium_benchmark_write_pbf.cpp index 9c9f026ef..e4542140c 100644 --- a/third_party/libosmium/benchmarks/osmium_benchmark_write_pbf.cpp +++ b/third_party/libosmium/benchmarks/osmium_benchmark_write_pbf.cpp @@ -18,12 +18,12 @@ int main(int argc, char* argv[]) { } try { - std::string input_filename{argv[1]}; - std::string output_filename{argv[2]}; + const std::string input_filename{argv[1]}; + const std::string output_filename{argv[2]}; osmium::io::Reader reader{input_filename}; - osmium::io::File output_file{output_filename, "pbf"}; - osmium::io::Header header; + const osmium::io::File output_file{output_filename, "pbf"}; + const osmium::io::Header header; osmium::io::Writer writer{output_file, header, osmium::io::overwrite::allow}; while (osmium::memory::Buffer buffer = reader.read()) { // NOLINT(bugprone-use-after-move) Bug in clang-tidy https://bugs.llvm.org/show_bug.cgi?id=36516 diff --git a/third_party/libosmium/build-appveyor.bat b/third_party/libosmium/build-appveyor.bat index 80c0550f6..5d0064b40 100644 --- a/third_party/libosmium/build-appveyor.bat +++ b/third_party/libosmium/build-appveyor.bat @@ -24,6 +24,11 @@ IF %ERRORLEVEL% NEQ 0 GOTO ERROR SET PATH=C:/projects/bzip2.v140.1.0.6.9/build/native/bin/x64/%config%;%PATH% +nuget install lz4 -Version 1.3.1.2 +IF %ERRORLEVEL% NEQ 0 GOTO ERROR + +SET PATH=C:/projects/lz4.1.3.1.2/build/native/bin/x64/%config%;%PATH% + CD libosmium ECHO config^: %config% @@ -52,7 +57,9 @@ SET CMAKE_CMD=cmake .. -LA -G "Visual Studio 14 Win64" ^ -DEXPAT_INCLUDE_DIR=C:/projects/expat.v140.2.2.5/build/native/include ^ -DEXPAT_LIBRARY=C:/projects/expat.v140.2.2.5/build/native/lib/x64/%config%/libexpat%libpostfix%.lib ^ -DBZIP2_INCLUDE_DIR=C:/projects/bzip2.v140.1.0.6.9/build/native/include ^ --DBZIP2_LIBRARIES=C:/projects/bzip2.v140.1.0.6.9/build/native/lib/x64/%config%/libbz2%libpostfix%.lib +-DBZIP2_LIBRARIES=C:/projects/bzip2.v140.1.0.6.9/build/native/lib/x64/%config%/libbz2%libpostfix%.lib ^ +-DLZ4_INCLUDE_DIR=C:/projects/lz4.1.3.1.2/build/native/include ^ +-DLZ4_LIBRARY=C:/projects/lz4.1.3.1.2/build/native/lib/x64/%config%/liblz4%libpostfix%.lib ECHO calling^: %CMAKE_CMD% %CMAKE_CMD% diff --git a/third_party/libosmium/build-msys2.bat b/third_party/libosmium/build-msys2.bat index bf2f23186..9c00a3573 100644 --- a/third_party/libosmium/build-msys2.bat +++ b/third_party/libosmium/build-msys2.bat @@ -16,8 +16,9 @@ call C:\msys64\mingw64\bin\gem.cmd install json REM Workaround for problem with spatialite (see https://github.com/osmcode/libosmium/issues/262) copy /y C:\msys64\mingw64\bin\libreadline8.dll C:\msys64\mingw64\bin\libreadline7.dll -echo "Setting PROJ_LIB variable for correct PROJ.4 working" +echo "Setting PROJ_LIB/DATA variable for correct PROJ.4 working" set PROJ_LIB=c:\msys64\mingw64\share\proj +set PROJ_DATA=c:\msys64\mingw64\share\proj set CXXFLAGS=-Wno-stringop-overflow diff --git a/third_party/libosmium/examples/osmium_amenity_list.cpp b/third_party/libosmium/examples/osmium_amenity_list.cpp index 17b2bede7..3103d0679 100644 --- a/third_party/libosmium/examples/osmium_amenity_list.cpp +++ b/third_party/libosmium/examples/osmium_amenity_list.cpp @@ -74,8 +74,8 @@ class AmenityHandler : public osmium::handler::Handler { c.y += nr.lat(); } - c.x /= nr_list.size(); - c.y /= nr_list.size(); + c.x /= static_cast(nr_list.size()); + c.y /= static_cast(nr_list.size()); return c; } diff --git a/third_party/libosmium/examples/osmium_area_test.cpp b/third_party/libosmium/examples/osmium_area_test.cpp index 4df749d6c..ac24ac810 100644 --- a/third_party/libosmium/examples/osmium_area_test.cpp +++ b/third_party/libosmium/examples/osmium_area_test.cpp @@ -122,11 +122,11 @@ int main(int argc, char* argv[]) { return 1; } - osmium::io::File input_file{argv[2]}; + const osmium::io::File input_file{argv[2]}; // Configuration for the multipolygon assembler. Here the default settings // are used, but you could change multiple settings. - osmium::area::Assembler::config_type assembler_config; + const osmium::area::Assembler::config_type assembler_config; // Set up a filter matching only forests. This will be used to only build // areas with matching tags. diff --git a/third_party/libosmium/examples/osmium_change_tags.cpp b/third_party/libosmium/examples/osmium_change_tags.cpp index 4348d17dd..e85e5aaee 100644 --- a/third_party/libosmium/examples/osmium_change_tags.cpp +++ b/third_party/libosmium/examples/osmium_change_tags.cpp @@ -153,8 +153,8 @@ int main(int argc, char* argv[]) { } // Get input and output file names from command line. - std::string input_file_name{argv[1]}; - std::string output_file_name{argv[2]}; + const std::string input_file_name{argv[1]}; + const std::string output_file_name{argv[2]}; try { // Initialize Reader diff --git a/third_party/libosmium/examples/osmium_count.cpp b/third_party/libosmium/examples/osmium_count.cpp index 71361ccfe..34bc68748 100644 --- a/third_party/libosmium/examples/osmium_count.cpp +++ b/third_party/libosmium/examples/osmium_count.cpp @@ -68,7 +68,7 @@ int main(int argc, char* argv[]) { try { // The Reader is initialized here with an osmium::io::File, but could // also be directly initialized with a file name. - osmium::io::File input_file{argv[1]}; + const osmium::io::File input_file{argv[1]}; osmium::io::Reader reader{input_file}; // Create an instance of our own CountHandler and push the data from the @@ -88,7 +88,7 @@ int main(int argc, char* argv[]) { // (though not this one) can use huge amounts of data. So checking actual // memore usage is often useful and can be done easily with this class. // (Currently only works on Linux, not macOS and Windows.) - osmium::MemoryUsage memory; + const osmium::MemoryUsage memory; std::cout << "\nMemory used: " << memory.peak() << " MBytes\n"; } catch (const std::exception& e) { diff --git a/third_party/libosmium/examples/osmium_create_pois.cpp b/third_party/libosmium/examples/osmium_create_pois.cpp index 44de48da1..8a30ff22e 100644 --- a/third_party/libosmium/examples/osmium_create_pois.cpp +++ b/third_party/libosmium/examples/osmium_create_pois.cpp @@ -40,11 +40,11 @@ int main(int argc, char* argv[]) { } // Get output file name from command line. - std::string output_file_name{argv[1]}; + const std::string output_file_name{argv[1]}; // If output file name is "-", this means STDOUT. Set the OPL file type // in this case. Otherwise take the file type from the file name suffix. - osmium::io::File output_file{output_file_name, output_file_name == "-" ? ".opl" : ""}; + const osmium::io::File output_file{output_file_name, output_file_name == "-" ? ".opl" : ""}; try { // Create a buffer where all objects will live. Use a sensible initial diff --git a/third_party/libosmium/examples/osmium_debug.cpp b/third_party/libosmium/examples/osmium_debug.cpp index d511fc8d1..8c9844c5c 100644 --- a/third_party/libosmium/examples/osmium_debug.cpp +++ b/third_party/libosmium/examples/osmium_debug.cpp @@ -43,7 +43,7 @@ int main(int argc, char* argv[]) { // Get entity types from command line if there is a 2nd argument. if (argc == 3) { read_types = osmium::osm_entity_bits::nothing; - std::string types = argv[2]; + const std::string types = argv[2]; if (types.find('n') != std::string::npos) { read_types |= osmium::osm_entity_bits::node; } diff --git a/third_party/libosmium/examples/osmium_dump_internal.cpp b/third_party/libosmium/examples/osmium_dump_internal.cpp index e655813bc..16f11d831 100644 --- a/third_party/libosmium/examples/osmium_dump_internal.cpp +++ b/third_party/libosmium/examples/osmium_dump_internal.cpp @@ -165,31 +165,31 @@ int main(int argc, char* argv[]) { reader.close(); // Write out node, way, and relation offset indexes to disk. - IndexFile nodes_idx{output_dir + "/nodes.idx"}; + const IndexFile nodes_idx{output_dir + "/nodes.idx"}; node_index.dump_as_list(nodes_idx.fd()); - IndexFile ways_idx{output_dir + "/ways.idx"}; + const IndexFile ways_idx{output_dir + "/ways.idx"}; way_index.dump_as_list(ways_idx.fd()); - IndexFile relations_idx{output_dir + "/relations.idx"}; + const IndexFile relations_idx{output_dir + "/relations.idx"}; relation_index.dump_as_list(relations_idx.fd()); // Sort the maps (so later binary search will work on them) and write // them to disk. map_node2way.sort(); - IndexFile node2way_idx{output_dir + "/node2way.map"}; + const IndexFile node2way_idx{output_dir + "/node2way.map"}; map_node2way.dump_as_list(node2way_idx.fd()); map_node2relation.sort(); - IndexFile node2relation_idx{output_dir + "/node2rel.map"}; + const IndexFile node2relation_idx{output_dir + "/node2rel.map"}; map_node2relation.dump_as_list(node2relation_idx.fd()); map_way2relation.sort(); - IndexFile way2relation_idx{output_dir + "/way2rel.map"}; + const IndexFile way2relation_idx{output_dir + "/way2rel.map"}; map_way2relation.dump_as_list(way2relation_idx.fd()); map_relation2relation.sort(); - IndexFile relation2relation_idx{output_dir + "/rel2rel.map"}; + const IndexFile relation2relation_idx{output_dir + "/rel2rel.map"}; map_relation2relation.dump_as_list(relation2relation_idx.fd()); } catch (const std::exception& e) { // All exceptions used by the Osmium library derive from std::exception. diff --git a/third_party/libosmium/examples/osmium_filter_discussions.cpp b/third_party/libosmium/examples/osmium_filter_discussions.cpp index 089b28ab2..2de151724 100644 --- a/third_party/libosmium/examples/osmium_filter_discussions.cpp +++ b/third_party/libosmium/examples/osmium_filter_discussions.cpp @@ -47,10 +47,10 @@ int main(int argc, char* argv[]) { try { // The input file, deduce file format from file suffix. - osmium::io::File input_file{argv[1]}; + const osmium::io::File input_file{argv[1]}; // The output file, force XML OSM file format. - osmium::io::File output_file{argv[2], "osm"}; + const osmium::io::File output_file{argv[2], "osm"}; // Initialize Reader for the input file. // Read only changesets (will ignore nodes, ways, and diff --git a/third_party/libosmium/examples/osmium_index_lookup.cpp b/third_party/libosmium/examples/osmium_index_lookup.cpp index d58a743ed..fa60d0433 100644 --- a/third_party/libosmium/examples/osmium_index_lookup.cpp +++ b/third_party/libosmium/examples/osmium_index_lookup.cpp @@ -67,8 +67,8 @@ public: IndexAccess(const IndexAccess&) = delete; IndexAccess& operator=(const IndexAccess&) = delete; - IndexAccess(IndexAccess&&) = delete; - IndexAccess& operator=(IndexAccess&&) = delete; + IndexAccess(IndexAccess&&) noexcept = delete; + IndexAccess& operator=(IndexAccess&&) noexcept = delete; virtual ~IndexAccess() noexcept = default; @@ -106,7 +106,7 @@ public: ~IndexAccessDense() noexcept override = default; void dump() const override { - index_type index{this->fd()}; + const index_type index{this->fd()}; for (std::size_t i = 0; i < index.size(); ++i) { if (index.get(i) != TValue{}) { @@ -116,7 +116,7 @@ public: } bool search(const osmium::unsigned_object_id_type& key) const override { - index_type index{this->fd()}; + const index_type index{this->fd()}; try { TValue value = index.get(key); @@ -153,7 +153,7 @@ public: ~IndexAccessSparse() noexcept override = default; void dump() const override { - index_type index{this->fd()}; + const index_type index{this->fd()}; for (const auto& element : index) { std::cout << element.first << " " << element.second << "\n"; @@ -164,7 +164,7 @@ public: using element_type = typename index_type::element_type; index_type index{this->fd()}; - element_type elem{key, TValue{}}; + const element_type elem{key, TValue{}}; const auto positions = std::equal_range(index.begin(), index.end(), elem, @@ -347,7 +347,7 @@ int run(const IndexAccess& index, const Options& options) { int main(int argc, char* argv[]) { // Parse command line options. - Options options{argc, argv}; + const Options options{argc, argv}; // Open the index file. const int fd = ::open(options.filename(), O_RDWR); diff --git a/third_party/libosmium/examples/osmium_read.cpp b/third_party/libosmium/examples/osmium_read.cpp index bf0203fbd..ac8531044 100644 --- a/third_party/libosmium/examples/osmium_read.cpp +++ b/third_party/libosmium/examples/osmium_read.cpp @@ -27,11 +27,11 @@ int main(int argc, char* argv[]) { try { // The Reader is initialized here with an osmium::io::File, but could // also be directly initialized with a file name. - osmium::io::File input_file{argv[1]}; + const osmium::io::File input_file{argv[1]}; osmium::io::Reader reader{input_file}; // OSM data comes in buffers, read until there are no more. - while (osmium::memory::Buffer buffer = reader.read()) { + while (const osmium::memory::Buffer buffer = reader.read()) { // do nothing } diff --git a/third_party/libosmium/examples/osmium_read_with_progress.cpp b/third_party/libosmium/examples/osmium_read_with_progress.cpp index 9cf752d1f..345348f7a 100644 --- a/third_party/libosmium/examples/osmium_read_with_progress.cpp +++ b/third_party/libosmium/examples/osmium_read_with_progress.cpp @@ -34,14 +34,14 @@ int main(int argc, char* argv[]) { try { // The Reader is initialized here with an osmium::io::File, but could // also be directly initialized with a file name. - osmium::io::File input_file{argv[1]}; + const osmium::io::File input_file{argv[1]}; osmium::io::Reader reader{input_file}; // Initialize progress bar, enable it only if STDERR is a TTY. osmium::ProgressBar progress{reader.file_size(), osmium::isatty(2)}; // OSM data comes in buffers, read until there are no more. - while (osmium::memory::Buffer buffer = reader.read()) { + while (const osmium::memory::Buffer buffer = reader.read()) { // Update progress bar for each buffer. progress.update(reader.offset()); } diff --git a/third_party/libosmium/examples/osmium_tiles.cpp b/third_party/libosmium/examples/osmium_tiles.cpp index 27c1721be..4a6a1f7b9 100644 --- a/third_party/libosmium/examples/osmium_tiles.cpp +++ b/third_party/libosmium/examples/osmium_tiles.cpp @@ -68,7 +68,7 @@ int main(int argc, char* argv[]) { // Create a tile at this location. This will also internally use the // Mercator projection and then calculate the tile coordinates. - const osmium::geom::Tile tile{uint32_t(zoom), location}; + const osmium::geom::Tile tile{static_cast(zoom), location}; std::cout << "Tile: zoom=" << tile.z << " x=" << tile.x << " y=" << tile.y << "\n"; } diff --git a/third_party/libosmium/include/osmium/area/assembler.hpp b/third_party/libosmium/include/osmium/area/assembler.hpp index cc9ac2c62..9ed2d5ff1 100644 --- a/third_party/libosmium/include/osmium/area/assembler.hpp +++ b/third_party/libosmium/include/osmium/area/assembler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -213,7 +213,7 @@ namespace osmium { // Now create the Area object and add the attributes and tags // from the relation. - bool okay = create_area(out_buffer, relation, members); + const bool okay = create_area(out_buffer, relation, members); if (okay) { out_buffer.commit(); } else { diff --git a/third_party/libosmium/include/osmium/area/assembler_config.hpp b/third_party/libosmium/include/osmium/area/assembler_config.hpp index 1a999d3a9..5fa11d2ca 100644 --- a/third_party/libosmium/include/osmium/area/assembler_config.hpp +++ b/third_party/libosmium/include/osmium/area/assembler_config.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -124,15 +124,6 @@ namespace osmium { AssemblerConfig() noexcept = default; - /** - * Constructor - * @deprecated Use default constructor and set values afterwards. - */ - explicit AssemblerConfig(ProblemReporter* pr, bool d = false) : - problem_reporter(pr), - debug_level(d) { - } - }; // struct AssemblerConfig } // namespace area diff --git a/third_party/libosmium/include/osmium/area/assembler_legacy.hpp b/third_party/libosmium/include/osmium/area/assembler_legacy.hpp index 0ca48735c..23bfa2bca 100644 --- a/third_party/libosmium/include/osmium/area/assembler_legacy.hpp +++ b/third_party/libosmium/include/osmium/area/assembler_legacy.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -332,10 +332,10 @@ namespace osmium { if (!way.nodes().empty() && way.is_closed() && !way.tags().empty()) { const auto d = std::count_if(way.tags().cbegin(), way.tags().cend(), std::cref(filter())); if (d > 0) { - osmium::tags::KeyFilter::iterator way_fi_begin(std::cref(filter()), way.tags().cbegin(), way.tags().cend()); - osmium::tags::KeyFilter::iterator way_fi_end(std::cref(filter()), way.tags().cend(), way.tags().cend()); - osmium::tags::KeyFilter::iterator area_fi_begin(std::cref(filter()), area_tags.cbegin(), area_tags.cend()); - osmium::tags::KeyFilter::iterator area_fi_end(std::cref(filter()), area_tags.cend(), area_tags.cend()); + const osmium::tags::KeyFilter::iterator way_fi_begin(std::cref(filter()), way.tags().cbegin(), way.tags().cend()); + const osmium::tags::KeyFilter::iterator way_fi_end(std::cref(filter()), way.tags().cend(), way.tags().cend()); + const osmium::tags::KeyFilter::iterator area_fi_begin(std::cref(filter()), area_tags.cbegin(), area_tags.cend()); + const osmium::tags::KeyFilter::iterator area_fi_end(std::cref(filter()), area_tags.cend(), area_tags.cend()); #ifdef __cpp_lib_robust_nonmodifying_seq_ops if (!std::equal(way_fi_begin, way_fi_end, area_fi_begin, area_fi_end)) { #else diff --git a/third_party/libosmium/include/osmium/area/detail/basic_assembler.hpp b/third_party/libosmium/include/osmium/area/detail/basic_assembler.hpp index 0fa8feb43..842136249 100644 --- a/third_party/libosmium/include/osmium/area/detail/basic_assembler.hpp +++ b/third_party/libosmium/include/osmium/area/detail/basic_assembler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -608,7 +608,7 @@ namespace osmium { void create_rings_simple_case() { auto count_remaining = m_segment_list.size(); - for (slocation& sl : m_locations) { + for (const slocation& sl : m_locations) { const NodeRefSegment& segment = m_segment_list[sl.item]; if (!segment.is_done()) { count_remaining -= add_new_ring(sl); @@ -671,7 +671,7 @@ namespace osmium { std::cerr << " Trying to merge " << open_ring_its.size() << " open rings (try_to_merge)\n"; } - std::vector xrings = create_location_to_ring_map(open_ring_its); + const auto xrings = create_location_to_ring_map(open_ring_its); auto it = xrings.cbegin(); while (it != xrings.cend()) { @@ -825,7 +825,7 @@ namespace osmium { find_inner_outer_complex(); ProtoRing* outer_ring = find_enclosing_ring(ring_min->ring().min_segment()); - bool ring_min_is_outer = !outer_ring; + const bool ring_min_is_outer = !outer_ring; if (debug()) { std::cerr << " Open ring is " << (ring_min_is_outer ? "outer" : "inner") << " ring\n"; } @@ -924,7 +924,7 @@ namespace osmium { // Now find all the rest of the rings (ie not starting at split locations) if (count_remaining > 0) { - for (slocation& sl : m_locations) { + for (const slocation& sl : m_locations) { const NodeRefSegment& segment = m_segment_list[sl.item]; if (!segment.is_done()) { count_remaining -= add_new_ring_complex(sl); diff --git a/third_party/libosmium/include/osmium/area/detail/basic_assembler_with_tags.hpp b/third_party/libosmium/include/osmium/area/detail/basic_assembler_with_tags.hpp index fa7aad110..b5a173b44 100644 --- a/third_party/libosmium/include/osmium/area/detail/basic_assembler_with_tags.hpp +++ b/third_party/libosmium/include/osmium/area/detail/basic_assembler_with_tags.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/area/detail/node_ref_segment.hpp b/third_party/libosmium/include/osmium/area/detail/node_ref_segment.hpp index 3db137f1a..8da4f8ccf 100644 --- a/third_party/libosmium/include/osmium/area/detail/node_ref_segment.hpp +++ b/third_party/libosmium/include/osmium/area/detail/node_ref_segment.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -193,7 +193,7 @@ namespace osmium { const char* role_name() const noexcept { static const std::array names = {{"unknown", "outer", "inner", "empty"}}; - return names[int(m_role)]; + return names[static_cast(m_role)]; } const osmium::Way* way() const noexcept { @@ -327,9 +327,9 @@ namespace osmium { if ((d > 0 && na >= 0 && na <= d && nb >= 0 && nb <= d) || (d < 0 && na <= 0 && na >= d && nb <= 0 && nb >= d)) { - const double ua = double(na) / d; + const double ua = static_cast(na) / static_cast(d); const vec i = p0 + ua * (p1 - p0); - return osmium::Location{int32_t(i.x), int32_t(i.y)}; + return osmium::Location{static_cast(i.x), static_cast(i.y)}; } return osmium::Location{}; diff --git a/third_party/libosmium/include/osmium/area/detail/proto_ring.hpp b/third_party/libosmium/include/osmium/area/detail/proto_ring.hpp index 9c3f41c18..9b773a0a9 100644 --- a/third_party/libosmium/include/osmium/area/detail/proto_ring.hpp +++ b/third_party/libosmium/include/osmium/area/detail/proto_ring.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -86,16 +86,16 @@ namespace osmium { int64_t m_num; #endif - int64_t m_sum; + int64_t m_sum = 0; public: explicit ProtoRing(NodeRefSegment* segment) noexcept : - m_min_segment(segment), + m_min_segment(segment) #ifdef OSMIUM_DEBUG_RING_NO - m_num(next_num()), + , m_num(next_num()) #endif - m_sum(0) { + { add_segment_back(segment); } diff --git a/third_party/libosmium/include/osmium/area/detail/segment_list.hpp b/third_party/libosmium/include/osmium/area/detail/segment_list.hpp index 4a4fe76f8..53f203215 100644 --- a/third_party/libosmium/include/osmium/area/detail/segment_list.hpp +++ b/third_party/libosmium/include/osmium/area/detail/segment_list.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -333,7 +333,7 @@ namespace osmium { } if (y_range_overlap(s1, s2)) { - osmium::Location intersection{calculate_intersection(s1, s2)}; + const osmium::Location intersection{calculate_intersection(s1, s2)}; if (intersection) { ++found_intersections; if (m_debug) { diff --git a/third_party/libosmium/include/osmium/area/detail/vector.hpp b/third_party/libosmium/include/osmium/area/detail/vector.hpp index a74e1d624..e52a65cc5 100644 --- a/third_party/libosmium/include/osmium/area/detail/vector.hpp +++ b/third_party/libosmium/include/osmium/area/detail/vector.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -89,12 +89,12 @@ namespace osmium { // scale vector constexpr inline vec operator*(double s, const vec& v) noexcept { - return vec{int64_t(s * v.x), int64_t(s * v.y)}; + return vec{static_cast(s * static_cast(v.x)), static_cast(s * static_cast(v.y))}; } // scale vector constexpr inline vec operator*(const vec& v, double s) noexcept { - return vec{int64_t(s * v.x), int64_t(s * v.y)}; + return vec{static_cast(s * static_cast(v.x)), static_cast(s * static_cast(v.y))}; } // equality diff --git a/third_party/libosmium/include/osmium/area/geom_assembler.hpp b/third_party/libosmium/include/osmium/area/geom_assembler.hpp index 5dd397764..6a665b4a9 100644 --- a/third_party/libosmium/include/osmium/area/geom_assembler.hpp +++ b/third_party/libosmium/include/osmium/area/geom_assembler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/area/multipolygon_collector.hpp b/third_party/libosmium/include/osmium/area/multipolygon_collector.hpp index 8f87db3ed..a2a70b69f 100644 --- a/third_party/libosmium/include/osmium/area/multipolygon_collector.hpp +++ b/third_party/libosmium/include/osmium/area/multipolygon_collector.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/area/multipolygon_manager.hpp b/third_party/libosmium/include/osmium/area/multipolygon_manager.hpp index 65dc89988..c478aa158 100644 --- a/third_party/libosmium/include/osmium/area/multipolygon_manager.hpp +++ b/third_party/libosmium/include/osmium/area/multipolygon_manager.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/area/multipolygon_manager_legacy.hpp b/third_party/libosmium/include/osmium/area/multipolygon_manager_legacy.hpp index 2f93ebc9b..feea9a04b 100644 --- a/third_party/libosmium/include/osmium/area/multipolygon_manager_legacy.hpp +++ b/third_party/libosmium/include/osmium/area/multipolygon_manager_legacy.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/area/problem_reporter.hpp b/third_party/libosmium/include/osmium/area/problem_reporter.hpp index 06da1fb64..4c32ed970 100644 --- a/third_party/libosmium/include/osmium/area/problem_reporter.hpp +++ b/third_party/libosmium/include/osmium/area/problem_reporter.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/area/problem_reporter_exception.hpp b/third_party/libosmium/include/osmium/area/problem_reporter_exception.hpp index 8caecddec..4527a9984 100644 --- a/third_party/libosmium/include/osmium/area/problem_reporter_exception.hpp +++ b/third_party/libosmium/include/osmium/area/problem_reporter_exception.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/area/problem_reporter_ogr.hpp b/third_party/libosmium/include/osmium/area/problem_reporter_ogr.hpp index c03096780..bad49f89c 100644 --- a/third_party/libosmium/include/osmium/area/problem_reporter_ogr.hpp +++ b/third_party/libosmium/include/osmium/area/problem_reporter_ogr.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -75,15 +75,15 @@ namespace osmium { void set_object(gdalcpp::Feature& feature) { const char t[2] = {osmium::item_type_to_char(m_object_type), '\0'}; feature.set_field("obj_type", t); - feature.set_field("obj_id", int32_t(m_object_id)); - feature.set_field("nodes", int32_t(m_nodes)); + feature.set_field("obj_id", static_cast(m_object_id)); + feature.set_field("nodes", static_cast(m_nodes)); } void write_point(const char* problem_type, osmium::object_id_type id1, osmium::object_id_type id2, osmium::Location location) { gdalcpp::Feature feature{m_layer_perror, m_ogr_factory.create_point(location)}; set_object(feature); - feature.set_field("id1", double(id1)); - feature.set_field("id2", double(id2)); + feature.set_field("id1", static_cast(id1)); + feature.set_field("id2", static_cast(id2)); feature.set_field("problem", problem_type); feature.add_to_layer(); } @@ -176,7 +176,7 @@ namespace osmium { try { gdalcpp::Feature feature{m_layer_lerror, m_ogr_factory.create_linestring(way)}; set_object(feature); - feature.set_field("id1", int32_t(way.id())); + feature.set_field("id1", static_cast(way.id())); feature.set_field("id2", 0); feature.set_field("problem", "way_in_multiple_rings"); feature.add_to_layer(); @@ -192,7 +192,7 @@ namespace osmium { try { gdalcpp::Feature feature{m_layer_lerror, m_ogr_factory.create_linestring(way)}; set_object(feature); - feature.set_field("id1", int32_t(way.id())); + feature.set_field("id1", static_cast(way.id())); feature.set_field("id2", 0); feature.set_field("problem", "inner_with_same_tags"); feature.add_to_layer(); @@ -208,7 +208,7 @@ namespace osmium { try { gdalcpp::Feature feature{m_layer_lerror, m_ogr_factory.create_linestring(way)}; set_object(feature); - feature.set_field("id1", int32_t(way.id())); + feature.set_field("id1", static_cast(way.id())); feature.set_field("id2", 0); feature.set_field("problem", "duplicate_way"); feature.add_to_layer(); @@ -229,7 +229,7 @@ namespace osmium { try { gdalcpp::Feature feature{m_layer_ways, m_ogr_factory.create_linestring(way)}; set_object(feature); - feature.set_field("way_id", int32_t(way.id())); + feature.set_field("way_id", static_cast(way.id())); feature.add_to_layer(); } catch (const osmium::geometry_error&) { // XXX diff --git a/third_party/libosmium/include/osmium/area/problem_reporter_stream.hpp b/third_party/libosmium/include/osmium/area/problem_reporter_stream.hpp index 73f4bb7d6..9fa2ccdb7 100644 --- a/third_party/libosmium/include/osmium/area/problem_reporter_stream.hpp +++ b/third_party/libosmium/include/osmium/area/problem_reporter_stream.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/area/stats.hpp b/third_party/libosmium/include/osmium/area/stats.hpp index 587473f4b..d081e6110 100644 --- a/third_party/libosmium/include/osmium/area/stats.hpp +++ b/third_party/libosmium/include/osmium/area/stats.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/builder/attr.hpp b/third_party/libosmium/include/osmium/builder/attr.hpp index 4214a39f9..b11272659 100644 --- a/third_party/libosmium/include/osmium/builder/attr.hpp +++ b/third_party/libosmium/include/osmium/builder/attr.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/builder/builder.hpp b/third_party/libosmium/include/osmium/builder/builder.hpp index c20b58a71..feda7c36e 100644 --- a/third_party/libosmium/include/osmium/builder/builder.hpp +++ b/third_party/libosmium/include/osmium/builder/builder.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/builder/osm_object_builder.hpp b/third_party/libosmium/include/osmium/builder/osm_object_builder.hpp index 228089737..c3228ca7d 100644 --- a/third_party/libosmium/include/osmium/builder/osm_object_builder.hpp +++ b/third_party/libosmium/include/osmium/builder/osm_object_builder.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -125,8 +125,8 @@ namespace osmium { if (value_length > osmium::max_osm_string_length) { throw std::length_error{"OSM tag value is too long"}; } - add_size(append_with_zero(key, osmium::memory::item_size_type(key_length))); - add_size(append_with_zero(value, osmium::memory::item_size_type(value_length))); + add_size(append_with_zero(key, static_cast(key_length))); + add_size(append_with_zero(value, static_cast(value_length))); } /** @@ -142,8 +142,8 @@ namespace osmium { if (value.size() > osmium::max_osm_string_length) { throw std::length_error{"OSM tag value is too long"}; } - add_size(append(key.data(), osmium::memory::item_size_type(key.size()) + 1)); - add_size(append(value.data(), osmium::memory::item_size_type(value.size()) + 1)); + add_size(append(key.data(), static_cast(key.size()) + 1)); + add_size(append(value.data(), static_cast(value.size()) + 1)); } /** @@ -240,8 +240,8 @@ namespace osmium { if (length > osmium::max_osm_string_length) { throw std::length_error{"OSM relation member role is too long"}; } - member.set_role_size(osmium::string_size_type(length) + 1); - add_size(append_with_zero(role, osmium::memory::item_size_type(length))); + member.set_role_size(static_cast(length) + 1); + add_size(append_with_zero(role, static_cast(length))); add_padding(true); } @@ -330,16 +330,16 @@ namespace osmium { if (length > osmium::max_osm_string_length) { throw std::length_error{"OSM user name is too long"}; } - comment.set_user_size(osmium::string_size_type(length) + 1); - add_size(append_with_zero(user, osmium::memory::item_size_type(length))); + comment.set_user_size(static_cast(length) + 1); + add_size(append_with_zero(user, static_cast(length))); } void add_text(osmium::ChangesetComment& comment, const char* text, const std::size_t length) { if (length > std::numeric_limits::max() - 1) { throw std::length_error{"OSM changeset comment is too long"}; } - comment.set_text_size(osmium::changeset_comment_size_type(length) + 1); - add_size(append_with_zero(text, osmium::memory::item_size_type(length))); + comment.set_text_size(static_cast(length) + 1); + add_size(append_with_zero(text, static_cast(length))); add_padding(true); } diff --git a/third_party/libosmium/include/osmium/diff_handler.hpp b/third_party/libosmium/include/osmium/diff_handler.hpp index 4d58be1cb..1f88f768d 100644 --- a/third_party/libosmium/include/osmium/diff_handler.hpp +++ b/third_party/libosmium/include/osmium/diff_handler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/diff_iterator.hpp b/third_party/libosmium/include/osmium/diff_iterator.hpp index 6573e14cc..08b8ea09b 100644 --- a/third_party/libosmium/include/osmium/diff_iterator.hpp +++ b/third_party/libosmium/include/osmium/diff_iterator.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/diff_visitor.hpp b/third_party/libosmium/include/osmium/diff_visitor.hpp index 2e855ad30..976c63313 100644 --- a/third_party/libosmium/include/osmium/diff_visitor.hpp +++ b/third_party/libosmium/include/osmium/diff_visitor.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/dynamic_handler.hpp b/third_party/libosmium/include/osmium/dynamic_handler.hpp index 6c2a53784..73f2ac54a 100644 --- a/third_party/libosmium/include/osmium/dynamic_handler.hpp +++ b/third_party/libosmium/include/osmium/dynamic_handler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/experimental/flex_reader.hpp b/third_party/libosmium/include/osmium/experimental/flex_reader.hpp index 66cf571eb..dc8289624 100644 --- a/third_party/libosmium/include/osmium/experimental/flex_reader.hpp +++ b/third_party/libosmium/include/osmium/experimental/flex_reader.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/fwd.hpp b/third_party/libosmium/include/osmium/fwd.hpp index c43be5fff..f556d3fc3 100644 --- a/third_party/libosmium/include/osmium/fwd.hpp +++ b/third_party/libosmium/include/osmium/fwd.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/geom/coordinates.hpp b/third_party/libosmium/include/osmium/geom/coordinates.hpp index 804400256..161c0021e 100644 --- a/third_party/libosmium/include/osmium/geom/coordinates.hpp +++ b/third_party/libosmium/include/osmium/geom/coordinates.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/geom/factory.hpp b/third_party/libosmium/include/osmium/geom/factory.hpp index 704ae4d66..07c7f2e67 100644 --- a/third_party/libosmium/include/osmium/geom/factory.hpp +++ b/third_party/libosmium/include/osmium/geom/factory.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -166,7 +166,7 @@ namespace osmium { public: - GeometryFactory() : + GeometryFactory() : m_projection(), m_impl(m_projection.epsg()) { } @@ -175,7 +175,7 @@ namespace osmium { * Constructor for default initialized projection. */ template - explicit GeometryFactory(TArgs&&... args) : + explicit GeometryFactory(TArgs&&... args) : m_projection(), m_impl(m_projection.epsg(), std::forward(args)...) { } @@ -185,7 +185,7 @@ namespace osmium { * projection is moved into the GeometryFactory. */ template - explicit GeometryFactory(TProjection&& projection, TArgs&&... args) : + explicit GeometryFactory(TProjection&& projection, TArgs&&... args) : m_projection(std::move(projection)), m_impl(m_projection.epsg(), std::forward(args)...) { } diff --git a/third_party/libosmium/include/osmium/geom/geojson.hpp b/third_party/libosmium/include/osmium/geom/geojson.hpp index 3d97702d7..193c8cd22 100644 --- a/third_party/libosmium/include/osmium/geom/geojson.hpp +++ b/third_party/libosmium/include/osmium/geom/geojson.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/geom/geos.hpp b/third_party/libosmium/include/osmium/geom/geos.hpp index c3c0c4d98..73538f9b5 100644 --- a/third_party/libosmium/include/osmium/geom/geos.hpp +++ b/third_party/libosmium/include/osmium/geom/geos.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/geom/haversine.hpp b/third_party/libosmium/include/osmium/geom/haversine.hpp index d0e95e2a4..3da00d588 100644 --- a/third_party/libosmium/include/osmium/geom/haversine.hpp +++ b/third_party/libosmium/include/osmium/geom/haversine.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/geom/mercator_projection.hpp b/third_party/libosmium/include/osmium/geom/mercator_projection.hpp index b0e67d993..acb4d27f1 100644 --- a/third_party/libosmium/include/osmium/geom/mercator_projection.hpp +++ b/third_party/libosmium/include/osmium/geom/mercator_projection.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/geom/ogr.hpp b/third_party/libosmium/include/osmium/geom/ogr.hpp index 1179ae064..226684b28 100644 --- a/third_party/libosmium/include/osmium/geom/ogr.hpp +++ b/third_party/libosmium/include/osmium/geom/ogr.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/geom/projection.hpp b/third_party/libosmium/include/osmium/geom/projection.hpp index 8a4c670ca..b96980f86 100644 --- a/third_party/libosmium/include/osmium/geom/projection.hpp +++ b/third_party/libosmium/include/osmium/geom/projection.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/geom/rapid_geojson.hpp b/third_party/libosmium/include/osmium/geom/rapid_geojson.hpp index c9d104a8c..94f172609 100644 --- a/third_party/libosmium/include/osmium/geom/rapid_geojson.hpp +++ b/third_party/libosmium/include/osmium/geom/rapid_geojson.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -47,6 +47,9 @@ namespace osmium { /** * A geometry factory implementation that can be used with the * RapidJSON (https://github.com/miloyip/rapidjson) JSON writer. + * + * @deprecated The RapidJSON support will be removed in a future + * version of libosmium. */ template class RapidGeoJSONFactoryImpl { diff --git a/third_party/libosmium/include/osmium/geom/relations.hpp b/third_party/libosmium/include/osmium/geom/relations.hpp index fb33f8912..6c4352d3e 100644 --- a/third_party/libosmium/include/osmium/geom/relations.hpp +++ b/third_party/libosmium/include/osmium/geom/relations.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/geom/tile.hpp b/third_party/libosmium/include/osmium/geom/tile.hpp index 4c3e02ed6..d03504bc9 100644 --- a/third_party/libosmium/include/osmium/geom/tile.hpp +++ b/third_party/libosmium/include/osmium/geom/tile.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/geom/util.hpp b/third_party/libosmium/include/osmium/geom/util.hpp index a51e72ddb..2e8ee858c 100644 --- a/third_party/libosmium/include/osmium/geom/util.hpp +++ b/third_party/libosmium/include/osmium/geom/util.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/geom/wkb.hpp b/third_party/libosmium/include/osmium/geom/wkb.hpp index a07844c78..15a7d44ec 100644 --- a/third_party/libosmium/include/osmium/geom/wkb.hpp +++ b/third_party/libosmium/include/osmium/geom/wkb.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -68,7 +68,7 @@ namespace osmium { std::string out; out.reserve(str.size() * 2); - for (char c : str) { + for (const char c : str) { out += lookup_hex[(static_cast(c) >> 4U) & 0xfU]; out += lookup_hex[ static_cast(c) & 0xfU]; } diff --git a/third_party/libosmium/include/osmium/geom/wkt.hpp b/third_party/libosmium/include/osmium/geom/wkt.hpp index 235b9daae..216873dfe 100644 --- a/third_party/libosmium/include/osmium/geom/wkt.hpp +++ b/third_party/libosmium/include/osmium/geom/wkt.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/handler.hpp b/third_party/libosmium/include/osmium/handler.hpp index 9d6fc8911..58bc427cd 100644 --- a/third_party/libosmium/include/osmium/handler.hpp +++ b/third_party/libosmium/include/osmium/handler.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/handler/chain.hpp b/third_party/libosmium/include/osmium/handler/chain.hpp index 432ee2afc..70ad76b3c 100644 --- a/third_party/libosmium/include/osmium/handler/chain.hpp +++ b/third_party/libosmium/include/osmium/handler/chain.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/handler/check_order.hpp b/third_party/libosmium/include/osmium/handler/check_order.hpp index 31de2b97c..1daedda31 100644 --- a/third_party/libosmium/include/osmium/handler/check_order.hpp +++ b/third_party/libosmium/include/osmium/handler/check_order.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/handler/disk_store.hpp b/third_party/libosmium/include/osmium/handler/disk_store.hpp index b6a9b43b5..e5bd36c51 100644 --- a/third_party/libosmium/include/osmium/handler/disk_store.hpp +++ b/third_party/libosmium/include/osmium/handler/disk_store.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/handler/dump.hpp b/third_party/libosmium/include/osmium/handler/dump.hpp index fcfa7f81a..86398c9cd 100644 --- a/third_party/libosmium/include/osmium/handler/dump.hpp +++ b/third_party/libosmium/include/osmium/handler/dump.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/handler/node_locations_for_ways.hpp b/third_party/libosmium/include/osmium/handler/node_locations_for_ways.hpp index 4fd38753e..8e66f3837 100644 --- a/third_party/libosmium/include/osmium/handler/node_locations_for_ways.hpp +++ b/third_party/libosmium/include/osmium/handler/node_locations_for_ways.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/handler/object_relations.hpp b/third_party/libosmium/include/osmium/handler/object_relations.hpp index 1cfec9255..a50b61c65 100644 --- a/third_party/libosmium/include/osmium/handler/object_relations.hpp +++ b/third_party/libosmium/include/osmium/handler/object_relations.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/index/bool_vector.hpp b/third_party/libosmium/include/osmium/index/bool_vector.hpp deleted file mode 100644 index 529063565..000000000 --- a/third_party/libosmium/include/osmium/index/bool_vector.hpp +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef OSMIUM_INDEX_BOOL_VECTOR_HPP -#define OSMIUM_INDEX_BOOL_VECTOR_HPP - -/* - -This file is part of Osmium (https://osmcode.org/libosmium). - -Copyright 2013-2022 Jochen Topf and others (see README). - -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -*/ - -#include - -namespace osmium { - - namespace index { - - /// @deprecated Use osmium::index::IdSet instead. - template - using BoolVector = IdSet; - - } // namespace index - -} // namespace osmium - -#endif // OSMIUM_INDEX_BOOL_VECTOR_HPP diff --git a/third_party/libosmium/include/osmium/index/detail/create_map_with_fd.hpp b/third_party/libosmium/include/osmium/index/detail/create_map_with_fd.hpp index 004b76833..c67329f9a 100644 --- a/third_party/libosmium/include/osmium/index/detail/create_map_with_fd.hpp +++ b/third_party/libosmium/include/osmium/index/detail/create_map_with_fd.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/index/detail/mmap_vector_anon.hpp b/third_party/libosmium/include/osmium/index/detail/mmap_vector_anon.hpp index 0f97e9999..075d187e8 100644 --- a/third_party/libosmium/include/osmium/index/detail/mmap_vector_anon.hpp +++ b/third_party/libosmium/include/osmium/index/detail/mmap_vector_anon.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/index/detail/mmap_vector_base.hpp b/third_party/libosmium/include/osmium/index/detail/mmap_vector_base.hpp index b5b193e5c..3da81ca4b 100644 --- a/third_party/libosmium/include/osmium/index/detail/mmap_vector_base.hpp +++ b/third_party/libosmium/include/osmium/index/detail/mmap_vector_base.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/index/detail/mmap_vector_file.hpp b/third_party/libosmium/include/osmium/index/detail/mmap_vector_file.hpp index 80e20adec..5f048e072 100644 --- a/third_party/libosmium/include/osmium/index/detail/mmap_vector_file.hpp +++ b/third_party/libosmium/include/osmium/index/detail/mmap_vector_file.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/index/detail/tmpfile.hpp b/third_party/libosmium/include/osmium/index/detail/tmpfile.hpp index 4734e671a..38746d3f1 100644 --- a/third_party/libosmium/include/osmium/index/detail/tmpfile.hpp +++ b/third_party/libosmium/include/osmium/index/detail/tmpfile.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/index/detail/vector_map.hpp b/third_party/libosmium/include/osmium/index/detail/vector_map.hpp index fd643144f..d9ee56db4 100644 --- a/third_party/libosmium/include/osmium/index/detail/vector_map.hpp +++ b/third_party/libosmium/include/osmium/index/detail/vector_map.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -241,7 +241,7 @@ namespace osmium { void dump_as_array(const int fd) final { constexpr const size_t value_size = sizeof(TValue); constexpr const size_t buffer_size = (10L * 1024L * 1024L) / value_size; - std::unique_ptr output_buffer{new TValue[buffer_size]}; + const std::unique_ptr output_buffer{new TValue[buffer_size]}; size_t buffer_start_id = 0; for (auto it = cbegin(); it != cend();) { diff --git a/third_party/libosmium/include/osmium/index/detail/vector_multimap.hpp b/third_party/libosmium/include/osmium/index/detail/vector_multimap.hpp index 3b4796209..ab272618e 100644 --- a/third_party/libosmium/include/osmium/index/detail/vector_multimap.hpp +++ b/third_party/libosmium/include/osmium/index/detail/vector_multimap.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 diff --git a/third_party/libosmium/include/osmium/index/id_set.hpp b/third_party/libosmium/include/osmium/index/id_set.hpp index 1c64aa55b..c2f44c59e 100644 --- a/third_party/libosmium/include/osmium/index/id_set.hpp +++ b/third_party/libosmium/include/osmium/index/id_set.hpp @@ -5,7 +5,7 @@ This file is part of Osmium (https://osmcode.org/libosmium). -Copyright 2013-2022 Jochen Topf and others (see README). +Copyright 2013-2023 Jochen Topf and others (see README). Boost Software License - Version 1.0 - August 17th, 2003 @@ -503,26 +503,6 @@ namespace osmium { }; // class IdSetSmall - /// @deprecated Use nwr_array helper class instead. - template