Remove reserve
This is flagging static analysis issues, because we don't reserve a
quadraticly sized increment. This is a micro optimization that never
made much sense.
Tested: Old code. Inspection only.
Change-Id: I442628751558616c24123dba66aab448a4c24039
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/include/dbus_monitor.hpp b/include/dbus_monitor.hpp
index 25f0c7f..db75fce 100644
--- a/include/dbus_monitor.hpp
+++ b/include/dbus_monitor.hpp
@@ -164,11 +164,6 @@
{
interfaceCount = 1;
}
- // Reserve our matches upfront. For each path there is 1 for
- // interfacesAdded, and InterfaceCount number for
- // PropertiesChanged
- thisSession.matches.reserve(thisSession.matches.size() +
- paths->size() * (1U + interfaceCount));
// These regexes derived on the rules here:
// https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names