summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-07-06 18:05:06 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-07-06 18:05:06 +0200
commit7eaf8b17dd3020c54ab58ae513c1175c95d5ccce (patch)
treebdf66afe5dff12131d6369d0dcc6ce6b6b641c7c /desktop
parent0f92d79708118d99fca4c60c30cd5c63c24e02fb (diff)
clang-tidy performance-implicit-cast-in-loop
...where the first component of the pair returned by the iterator would be const, so an implicit conversion would be required. Change-Id: I62b6ddd799261e1dd63ea5c42a85d8b071f8b8b7
Diffstat (limited to 'desktop')
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx4
-rw-r--r--desktop/source/lib/init.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index efe8601b378c..3304600b64d2 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -247,7 +247,7 @@ void DesktopLOKTest::testGetStyles()
boost::property_tree::ptree aValues = aTree.get_child("commandValues");
CPPUNIT_ASSERT( aValues.size() > 0 );
- for (const std::pair<std::string, boost::property_tree::ptree>& rPair : aValues)
+ for (const auto& rPair : aValues)
{
if( rPair.first != "ClearStyle")
{
@@ -281,7 +281,7 @@ void DesktopLOKTest::testGetFonts()
boost::property_tree::ptree aValues = aTree.get_child("commandValues");
CPPUNIT_ASSERT( aValues.size() > 0 );
- for (const std::pair<std::string, boost::property_tree::ptree>& rPair : aValues)
+ for (const auto& rPair : aValues)
{
// check that we have font sizes available for each font
CPPUNIT_ASSERT( rPair.second.size() > 0);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index a6640d078b17..352ccd595a99 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -269,7 +269,7 @@ static std::vector<beans::PropertyValue> jsonToPropertyValuesVector(const char*
std::stringstream aStream(pJSON);
boost::property_tree::read_json(aStream, aTree);
- for (const std::pair<std::string, boost::property_tree::ptree>& rPair : aTree)
+ for (const auto& rPair : aTree)
{
const std::string& rType = rPair.second.get<std::string>("type");
const std::string& rValue = rPair.second.get<std::string>("value");