From 48e8382785f3db82852bb8f37567e866bf83251a Mon Sep 17 00:00:00 2001 From: Siarhei Fedartsou Date: Sun, 20 Oct 2024 19:46:49 +0200 Subject: [PATCH] Remove unused bearing::get function (#7040) * Remove unused bearing::get function * Remove unused bearing::get function * Remove unused bearing::get function * Remove unused bearing::get function --- .github/workflows/osrm-backend.yml | 7 ++++++ include/util/bearing.hpp | 40 ------------------------------ unit_tests/util/io.cpp | 1 - 3 files changed, 7 insertions(+), 41 deletions(-) diff --git a/.github/workflows/osrm-backend.yml b/.github/workflows/osrm-backend.yml index fe4ee32482c..abbe092459f 100644 --- a/.github/workflows/osrm-backend.yml +++ b/.github/workflows/osrm-backend.yml @@ -502,6 +502,13 @@ jobs: conan config init yq eval '.compiler.clang.version += ["18"]' -i "$HOME/.conan/settings.yml" + - name: Add Apple-clang 16 to list of Conan compilers # workaround for the issue that Conan 1.x doesn't know about Apple-clang 16 + if: ${{ matrix.ENABLE_CONAN == 'ON' && matrix.runs-on == 'macos-14' }} + run: | + sudo wget https://github.com/mikefarah/yq/releases/download/v4.9.6/yq_darwin_arm64 -O /usr/local/bin/yq && sudo chmod +x /usr/local/bin/yq + + conan config init + yq eval '.compiler.apple-clang.version += ["16.0"]' -i "$HOME/.conan/settings.yml" - name: Prepare build run: | mkdir ${OSRM_BUILD_DIR} diff --git a/include/util/bearing.hpp b/include/util/bearing.hpp index cc2cdfda495..4318786951b 100644 --- a/include/util/bearing.hpp +++ b/include/util/bearing.hpp @@ -11,46 +11,6 @@ namespace osrm::util namespace bearing { -inline std::string get(const double heading) -{ - BOOST_ASSERT(heading >= 0); - BOOST_ASSERT(heading <= 360); - - if (heading <= 22.5) - { - return "N"; - } - if (heading <= 67.5) - { - return "NE"; - } - if (heading <= 112.5) - { - return "E"; - } - if (heading <= 157.5) - { - return "SE"; - } - if (heading <= 202.5) - { - return "S"; - } - if (heading <= 247.5) - { - return "SW"; - } - if (heading <= 292.5) - { - return "W"; - } - if (heading <= 337.5) - { - return "NW"; - } - return "N"; -} - // Checks whether A is between B-range and B+range, all modulo 360 // e.g. A = 5, B = 5, range = 10 == true // A = -6, B = 5, range = 10 == false diff --git a/unit_tests/util/io.cpp b/unit_tests/util/io.cpp index 4cc3a688b1a..d9f86d0e7f5 100644 --- a/unit_tests/util/io.cpp +++ b/unit_tests/util/io.cpp @@ -17,7 +17,6 @@ const static std::string IO_TOO_SMALL_FILE = "file_too_small_test_io.tmp"; const static std::string IO_CORRUPT_FINGERPRINT_FILE = "corrupt_fingerprint_file_test_io.tmp"; const static std::string IO_INCOMPATIBLE_FINGERPRINT_FILE = "incompatible_fingerprint_file_test_io.tmp"; -const static std::string IO_TEXT_FILE = "plain_text_file.tmp"; using namespace osrm;