From a5410ac5ece4ef4d52eab07201c5f6c6c4501921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Tim=C3=B3n?= Date: Thu, 1 Jun 2017 22:22:33 +0200 Subject: [PATCH] Small preparations for Q_FOREACH, PAIRTYPE and #include removal --- src/httprpc.cpp | 2 +- src/qt/platformstyle.cpp | 3 +-- src/utilstrencodings.h | 2 -- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/httprpc.cpp b/src/httprpc.cpp index 5ab6d8d7326..f1eb1c36e7b 100644 --- a/src/httprpc.cpp +++ b/src/httprpc.cpp @@ -19,7 +19,7 @@ #include "utilstrencodings.h" #include // boost::trim -#include //BOOST_FOREACH +#include /** WWW-Authenticate to present with 401 Unauthorized response */ static const char* WWW_AUTH_HEADER_DATA = "Basic realm=\"jsonrpc\""; diff --git a/src/qt/platformstyle.cpp b/src/qt/platformstyle.cpp index 90bd619c041..64a0d0058c5 100644 --- a/src/qt/platformstyle.cpp +++ b/src/qt/platformstyle.cpp @@ -48,8 +48,7 @@ void MakeSingleColorImage(QImage& img, const QColor& colorbase) QIcon ColorizeIcon(const QIcon& ico, const QColor& colorbase) { QIcon new_ico; - QSize sz; - Q_FOREACH(sz, ico.availableSizes()) + Q_FOREACH(const QSize sz, ico.availableSizes()) { QImage img(ico.pixmap(sz).toImage()); MakeSingleColorImage(img, colorbase); diff --git a/src/utilstrencodings.h b/src/utilstrencodings.h index e2a1b9bef9a..8846cb47eef 100644 --- a/src/utilstrencodings.h +++ b/src/utilstrencodings.h @@ -18,8 +18,6 @@ #define UBEGIN(a) ((unsigned char*)&(a)) #define UEND(a) ((unsigned char*)&((&(a))[1])) #define ARRAYLEN(array) (sizeof(array)/sizeof((array)[0])) - -/** This is needed because the foreach macro can't get over the comma in pair */ #define PAIRTYPE(t1, t2) std::pair /** Used by SanitizeString() */