diff options
author | George Hazan <ghazan@miranda.im> | 2018-02-21 18:35:21 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-02-21 18:40:14 +0300 |
commit | 429c0d0524e7197a593209468fef530344f5ee05 (patch) | |
tree | 71df95fdf71c52a956de69b6f31f3a6528053442 /plugins/TabSRMM/src/chat_log.cpp | |
parent | 5b6db3290cb9c9817cba126bd7aea798a610c31d (diff) |
tabsrmm: C++'11 iterators
Diffstat (limited to 'plugins/TabSRMM/src/chat_log.cpp')
-rw-r--r-- | plugins/TabSRMM/src/chat_log.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
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]));
|