Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Unified Diff: extensions/common/update_manifest.cc

Issue 598173003: Run clang-modernize -use-nullptr over src/extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/common/update_manifest.cc
diff --git a/extensions/common/update_manifest.cc b/extensions/common/update_manifest.cc
index 26d794f11f4ec9f25262169d98082473399ad41e..4ce1aab8d21198e172479f5d231b50a49c96074d 100644
--- a/extensions/common/update_manifest.cc
+++ b/extensions/common/update_manifest.cc
@@ -60,7 +60,7 @@ static bool TagNameEquals(const xmlNode* node, const char* expected_name,
static std::vector<xmlNode*> GetChildren(xmlNode* root, xmlNs* xml_namespace,
const char* name) {
std::vector<xmlNode*> result;
- for (xmlNode* child = root->children; child != NULL; child = child->next) {
+ for (xmlNode* child = root->children; child != nullptr; child = child->next) {
if (!TagNameEquals(child, name, xml_namespace)) {
continue;
}
@@ -72,7 +72,7 @@ static std::vector<xmlNode*> GetChildren(xmlNode* root, xmlNs* xml_namespace,
// Returns the value of a named attribute, or the empty string.
static std::string GetAttribute(xmlNode* node, const char* attribute_name) {
const xmlChar* name = reinterpret_cast<const xmlChar*>(attribute_name);
- for (xmlAttr* attr = node->properties; attr != NULL; attr = attr->next) {
+ for (xmlAttr* attr = node->properties; attr != nullptr; attr = attr->next) {
if (!xmlStrcmp(attr->name, name) && attr->children &&
attr->children->content) {
return std::string(reinterpret_cast<const char*>(
@@ -113,12 +113,12 @@ class ScopedXmlDocument {
// NULL if there isn't one with that href.
static xmlNs* GetNamespace(xmlNode* node, const char* expected_href) {
const xmlChar* href = reinterpret_cast<const xmlChar*>(expected_href);
- for (xmlNs* ns = node->ns; ns != NULL; ns = ns->next) {
+ for (xmlNs* ns = node->ns; ns != nullptr; ns = ns->next) {
if (ns->href && !xmlStrcmp(ns->href, href)) {
return ns;
}
}
- return NULL;
+ return nullptr;
}

Powered by Google App Engine
This is Rietveld 408576698