Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/Notification.cpp

Issue 29391775: Issue 5013 - Improve some const-correctness (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Feedback + another small patch related. Created March 22, 2017, 4:50 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/Notification.cpp
===================================================================
--- a/src/Notification.cpp
+++ b/src/Notification.cpp
@@ -88,20 +88,19 @@ std::vector<std::string> Notification::G
{
std::vector<std::string> retValue;
JsValuePtr jsLinks = GetProperty("links");
if (!jsLinks->IsArray())
{
return retValue;
}
JsValueList urlLinksList = jsLinks->AsList();
- for (JsValueList::const_iterator linkIterator = urlLinksList.begin();
- linkIterator != urlLinksList.end(); ++linkIterator)
+ for (const auto& link : urlLinksList)
{
- retValue.push_back((*linkIterator)->AsString());
+ retValue.push_back(link->AsString());
}
return retValue;
}
void Notification::MarkAsShown()
{
jsEngine->Evaluate("API.markNotificationAsShown")->Call(*GetProperty("id"));
-}
+}

Powered by Google App Engine
This is Rietveld