From a1015048b6a60c06f9634c5756feaff8f12d5266 Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Mon, 6 May 2024 15:59:58 -0700 Subject: 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 --- include/dbus_monitor.hpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/dbus_monitor.hpp b/include/dbus_monitor.hpp index 25f0c7f772..db75fce823 100644 --- a/include/dbus_monitor.hpp +++ b/include/dbus_monitor.hpp @@ -164,11 +164,6 @@ inline void requestRoutes(App& app) { 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 -- cgit v1.2.3