collapse if statement in datastore

This commit is contained in:
Dennis Luxen 2014-07-02 11:18:45 +02:00
parent 3568dc2083
commit 36c0edea2a

View File

@ -63,9 +63,7 @@ typedef StaticGraph<QueryEdge::EdgeData> QueryGraph;
// delete a shared memory region. report warning if it could not be deleted
void delete_region(const SharedDataType region)
{
if (SharedMemory::RegionExists(region))
{
if (!SharedMemory::Remove(region))
if (SharedMemory::RegionExists(region) && !SharedMemory::Remove(region))
{
const std::string name = [&]
{
@ -91,7 +89,6 @@ void delete_region(const SharedDataType region)
SimpleLogger().Write(logWARNING) << "could not delete shared memory region " << name;
}
}
}
// find all existing shmem regions and remove them.
void springclean()