From 98290ce05785cccb1b7132e0822996e4c9ea7b2a Mon Sep 17 00:00:00 2001 From: Nils <> Date: Thu, 2 Jul 2020 22:45:37 +0200 Subject: [PATCH] Use prefix ++ operator for non-primitive type to avoid keeping a copy of the previous value around --- src/nsmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nsmd.cpp b/src/nsmd.cpp index efa8a42..b40e5bb 100644 --- a/src/nsmd.cpp +++ b/src/nsmd.cpp @@ -598,7 +598,7 @@ number_of_reponsive_clients ( void ) */ int responsive = 0; - for ( std::list::const_iterator i = client.begin(); i != client.end(); i++ ) + for ( std::list::const_iterator i = client.begin(); i != client.end(); ++i ) { //Optimisation: Clients that never launched (e.g. file not found) will be checked many times/seconds here. We skip them by counting them if ( (*i)->active || (*i)->launch_error )