From 391980ce1e890445542441eeb5d9f9cc18ae1baf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 26 Jan 2018 22:31:20 +0300 Subject: code optimization --- plugins/Clist_modern/src/modern_contact.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'plugins/Clist_modern/src/modern_contact.cpp') diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp index 45f4c29615..3e15378cf1 100644 --- a/plugins/Clist_modern/src/modern_contact.cpp +++ b/plugins/Clist_modern/src/modern_contact.cpp @@ -51,9 +51,10 @@ static int GetContactStatus(MCONTACT hContact) static int GetStatusModeOrdering(int statusMode) { - for (int i = 0; i < _countof(statusModeOrder); i++) - if (statusModeOrder[i].status == statusMode) - return statusModeOrder[i].order; + for (auto &it : statusModeOrder) + if (it.status == statusMode) + return it.order; + return 1000; } -- cgit v1.2.3