From 429c0d0524e7197a593209468fef530344f5ee05 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 21 Feb 2018 18:35:21 +0300 Subject: tabsrmm: C++'11 iterators --- plugins/TabSRMM/src/chat_log.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'plugins/TabSRMM/src/chat_log.cpp') diff --git a/plugins/TabSRMM/src/chat_log.cpp b/plugins/TabSRMM/src/chat_log.cpp index 582c72f297..f737795772 100644 --- a/plugins/TabSRMM/src/chat_log.cpp +++ b/plugins/TabSRMM/src/chat_log.cpp @@ -651,13 +651,11 @@ char* Log_CreateRtfHeader(void) // colour table str.Append("}{\\colortbl ;"); - for (int i = 0; i < OPTIONS_FONTCOUNT; i++) - str.AppendFormat("\\red%u\\green%u\\blue%u;", GetRValue(pci->aFonts[i].color), GetGValue(pci->aFonts[i].color), GetBValue(pci->aFonts[i].color)); + for (auto &it : pci->aFonts) + str.AppendFormat("\\red%u\\green%u\\blue%u;", GetRValue(it.color), GetGValue(it.color), GetBValue(it.color)); - for (int i = 0; i < Utils::rtf_clrs.getCount(); i++) { - COLORREF clr = Utils::rtf_clrs[i].clr; - str.AppendFormat("\\red%u\\green%u\\blue%u;", GetRValue(clr), GetGValue(clr), GetBValue(clr)); - } + for (auto &it : Utils::rtf_clrs) + str.AppendFormat("\\red%u\\green%u\\blue%u;", GetRValue(it->clr), GetGValue(it->clr), GetBValue(it->clr)); for (int i = 0; i < STATUSICONCOUNT; i++) str.AppendFormat("\\red%u\\green%u\\blue%u;", GetRValue(g_Settings.nickColors[i]), GetGValue(g_Settings.nickColors[i]), GetBValue(g_Settings.nickColors[i])); -- cgit v1.2.3