Remove redundant nullptr check. (#6326)

This commit is contained in:
Siarhei Fedartsou 2022-08-25 00:01:56 +02:00 committed by GitHub
parent 91895604c9
commit df3c553f4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 7 deletions

View File

@ -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)

View File

@ -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();

View File

@ -312,7 +312,7 @@ std::vector<std::pair<bool, boost::filesystem::path>> Storage::GetStaticFiles()
{
if (file.first == IS_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());
}
}
@ -337,7 +337,7 @@ std::vector<std::pair<bool, boost::filesystem::path>> Storage::GetUpdatableFiles
{
if (file.first == IS_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());
}
}