Skip to content

Commit

Permalink
Remove unused bearing::get function (Project-OSRM#7040)
Browse files Browse the repository at this point in the history
* Remove unused bearing::get function

* Remove unused bearing::get function

* Remove unused bearing::get function

* Remove unused bearing::get function
  • Loading branch information
SiarheiFedartsou authored Oct 20, 2024
1 parent becfd8a commit 48e8382
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 41 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/osrm-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
40 changes: 0 additions & 40 deletions include/util/bearing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion unit_tests/util/io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 48e8382

Please sign in to comment.