Skip to content

Commit

Permalink
Remove redundant nullptr check.
Browse files Browse the repository at this point in the history
  • Loading branch information
SiarheiFedartsou committed Aug 24, 2022
1 parent a98074a commit 548a187
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- NodeJS:
- FIXED: Support `skip_waypoints` in Node bindings [#6060](https://github.com/Project-OSRM/osrm-backend/pull/6060)
- Misc:
- CHANGED: Remove redundant nullptr check. [#6326](https://github.com/Project-OSRM/osrm-backend/pull/6326)
- CHANGED: missing files list is included in exception message. [#5360](https://github.com/Project-OSRM/osrm-backend/pull/5360)
- CHANGED: Do not use deprecated Callback::Call overload in Node bindings. [#6318](https://github.com/Project-OSRM/osrm-backend/pull/6318)
- FIXED: Fix distance calculation consistency. [#6315](https://github.com/Project-OSRM/osrm-backend/pull/6315)
Expand Down
6 changes: 1 addition & 5 deletions include/util/deallocating_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,7 @@ template <typename ElementT> class DeallocatingVector
// Delete[]'ing ptr's to all Buckets
for (auto bucket : bucket_list)
{
if (nullptr != bucket)
{
delete[] bucket;
bucket = nullptr;
}
delete[] bucket;
}
bucket_list.clear();
bucket_list.shrink_to_fit();
Expand Down
4 changes: 2 additions & 2 deletions src/storage/storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ std::vector<std::pair<bool, boost::filesystem::path>> Storage::GetStaticFiles()
{
if (file.first == REQUIRED && !boost::filesystem::exists(file.second))
{
throw util::exception("Could not find required filed: " + std::get<1>(file).string());
throw util::exception("Could not find required file(s): " + std::get<1>(file).string());
}
}

Expand All @@ -337,7 +337,7 @@ std::vector<std::pair<bool, boost::filesystem::path>> Storage::GetUpdatableFiles
{
if (file.first == REQUIRED && !boost::filesystem::exists(file.second))
{
throw util::exception("Could not find required filed: " + std::get<1>(file).string());
throw util::exception("Could not find required file(s): " + std::get<1>(file).string());
}
}

Expand Down

0 comments on commit 548a187

Please sign in to comment.