Remove redundant nullptr check. (#6326)
This commit is contained in:
parent
91895604c9
commit
df3c553f4f
@ -7,6 +7,7 @@
|
|||||||
- NodeJS:
|
- NodeJS:
|
||||||
- FIXED: Support `skip_waypoints` in Node bindings [#6060](https://github.com/Project-OSRM/osrm-backend/pull/6060)
|
- FIXED: Support `skip_waypoints` in Node bindings [#6060](https://github.com/Project-OSRM/osrm-backend/pull/6060)
|
||||||
- Misc:
|
- 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: 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)
|
- 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)
|
- FIXED: Fix distance calculation consistency. [#6315](https://github.com/Project-OSRM/osrm-backend/pull/6315)
|
||||||
|
@ -236,11 +236,7 @@ template <typename ElementT> class DeallocatingVector
|
|||||||
// Delete[]'ing ptr's to all Buckets
|
// Delete[]'ing ptr's to all Buckets
|
||||||
for (auto bucket : bucket_list)
|
for (auto bucket : bucket_list)
|
||||||
{
|
{
|
||||||
if (nullptr != bucket)
|
delete[] bucket;
|
||||||
{
|
|
||||||
delete[] bucket;
|
|
||||||
bucket = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
bucket_list.clear();
|
bucket_list.clear();
|
||||||
bucket_list.shrink_to_fit();
|
bucket_list.shrink_to_fit();
|
||||||
|
@ -312,7 +312,7 @@ std::vector<std::pair<bool, boost::filesystem::path>> Storage::GetStaticFiles()
|
|||||||
{
|
{
|
||||||
if (file.first == IS_REQUIRED && !boost::filesystem::exists(file.second))
|
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))
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user