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: Removed GetType() const-ness change Created March 23, 2017, 12:57 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
« no previous file with comments | « src/JsValue.cpp ('k') | src/WebRequestJsObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"));
-}
+}
« no previous file with comments | « src/JsValue.cpp ('k') | src/WebRequestJsObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld