EntityManager: Clean up interface removal condition
The early exit only serves to decrease readability by negating a
condition and adding more lines. Instead, add another negation and
remove a line.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I3c2dc571b4fe7b1c763f5951c64e35d43b77ce0a
diff --git a/src/EntityManager.cpp b/src/EntityManager.cpp
index e484af7..173f4dc 100644
--- a/src/EntityManager.cpp
+++ b/src/EntityManager.cpp
@@ -983,11 +983,10 @@
for (auto& iface : ifaces)
{
auto sharedPtr = iface.lock();
- if (!sharedPtr)
+ if (!!sharedPtr)
{
- continue; // was already deleted elsewhere
+ objServer.remove_interface(sharedPtr);
}
- objServer.remove_interface(sharedPtr);
}
ifaces.clear();
systemConfiguration.erase(name);