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

Unified Diff: content/common/cursors/webcursor.cc

Issue 649533003: C++11 declares a type safe null pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Presubmit errors Created 6 years, 2 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
« no previous file with comments | « content/common/cursors/webcursor.h ('k') | content/common/cursors/webcursor_aurawin.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/cursors/webcursor.cc
diff --git a/content/common/cursors/webcursor.cc b/content/common/cursors/webcursor.cc
index 85721fdd0e2bae52ef010ff19ae60df6eb764d36..0a22f061c0f130c7860c5928b3f980ab27fc7be8 100644
--- a/content/common/cursors/webcursor.cc
+++ b/content/common/cursors/webcursor.cc
@@ -18,7 +18,7 @@ WebCursor::WebCursor()
: type_(WebCursorInfo::TypePointer),
custom_scale_(1) {
#if defined(OS_WIN)
- external_cursor_ = NULL;
+ external_cursor_ = nullptr;
#endif
InitPlatformData();
}
@@ -26,7 +26,7 @@ WebCursor::WebCursor()
WebCursor::WebCursor(const CursorInfo& cursor_info)
: type_(WebCursorInfo::TypePointer) {
#if defined(OS_WIN)
- external_cursor_ = NULL;
+ external_cursor_ = nullptr;
#endif
InitPlatformData();
InitFromCursorInfo(cursor_info);
@@ -141,7 +141,7 @@ bool WebCursor::Serialize(Pickle* pickle) const {
!pickle->WriteFloat(custom_scale_))
return false;
- const char* data = NULL;
+ const char* data = nullptr;
if (!custom_data_.empty())
data = &custom_data_[0];
if (!pickle->WriteData(data, custom_data_.size()))
@@ -174,19 +174,22 @@ static WebCursorInfo::Type ToCursorType(HCURSOR cursor) {
HCURSOR cursor;
WebCursorInfo::Type type;
} kStandardCursors[] = {
- { LoadCursor(NULL, IDC_ARROW), WebCursorInfo::TypePointer },
- { LoadCursor(NULL, IDC_CROSS), WebCursorInfo::TypeCross },
- { LoadCursor(NULL, IDC_HAND), WebCursorInfo::TypeHand },
- { LoadCursor(NULL, IDC_IBEAM), WebCursorInfo::TypeIBeam },
- { LoadCursor(NULL, IDC_WAIT), WebCursorInfo::TypeWait },
- { LoadCursor(NULL, IDC_HELP), WebCursorInfo::TypeHelp },
- { LoadCursor(NULL, IDC_SIZENESW), WebCursorInfo::TypeNorthEastResize },
- { LoadCursor(NULL, IDC_SIZENWSE), WebCursorInfo::TypeNorthWestResize },
- { LoadCursor(NULL, IDC_SIZENS), WebCursorInfo::TypeNorthSouthResize },
- { LoadCursor(NULL, IDC_SIZEWE), WebCursorInfo::TypeEastWestResize },
- { LoadCursor(NULL, IDC_SIZEALL), WebCursorInfo::TypeMove },
- { LoadCursor(NULL, IDC_APPSTARTING), WebCursorInfo::TypeProgress },
- { LoadCursor(NULL, IDC_NO), WebCursorInfo::TypeNotAllowed },
+ { LoadCursor(nullptr, IDC_ARROW), WebCursorInfo::TypePointer },
+ { LoadCursor(nullptr, IDC_CROSS), WebCursorInfo::TypeCross },
+ { LoadCursor(nullptr, IDC_HAND), WebCursorInfo::TypeHand },
+ { LoadCursor(nullptr, IDC_IBEAM), WebCursorInfo::TypeIBeam },
+ { LoadCursor(nullptr, IDC_WAIT), WebCursorInfo::TypeWait },
+ { LoadCursor(nullptr, IDC_HELP), WebCursorInfo::TypeHelp },
+ { LoadCursor(nullptr, IDC_SIZENESW),
+ WebCursorInfo::TypeNorthEastResize },
+ { LoadCursor(nullptr, IDC_SIZENWSE),
+ WebCursorInfo::TypeNorthWestResize },
+ { LoadCursor(nullptr, IDC_SIZENS),
+ WebCursorInfo::TypeNorthSouthResize },
+ { LoadCursor(nullptr, IDC_SIZEWE), WebCursorInfo::TypeEastWestResize },
+ { LoadCursor(nullptr, IDC_SIZEALL), WebCursorInfo::TypeMove },
+ { LoadCursor(nullptr, IDC_APPSTARTING), WebCursorInfo::TypeProgress },
+ { LoadCursor(nullptr, IDC_NO), WebCursorInfo::TypeNotAllowed },
};
for (int i = 0; i < arraysize(kStandardCursors); ++i) {
if (cursor == kStandardCursors[i].cursor)
« no previous file with comments | « content/common/cursors/webcursor.h ('k') | content/common/cursors/webcursor_aurawin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698