Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redundant nullptr check. #6326

Merged
merged 1 commit into from
Aug 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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