NULL => nullptr
This commit is contained in:
parent
00693ba075
commit
d425b63b0d
4 changed files with 9 additions and 9 deletions
|
@ -1262,7 +1262,7 @@ void NativeWindowMac::SetProgressBar(double progress, const NativeWindow::Progre
|
||||||
NSDockTile* dock_tile = [NSApp dockTile];
|
NSDockTile* dock_tile = [NSApp dockTile];
|
||||||
|
|
||||||
// For the first time API invoked, we need to create a ContentView in DockTile.
|
// For the first time API invoked, we need to create a ContentView in DockTile.
|
||||||
if (dock_tile.contentView == NULL) {
|
if (dock_tile.contentView == nullptr) {
|
||||||
NSImageView* image_view = [[NSImageView alloc] init];
|
NSImageView* image_view = [[NSImageView alloc] init];
|
||||||
[image_view setImage:[NSApp applicationIconImage]];
|
[image_view setImage:[NSApp applicationIconImage]];
|
||||||
[dock_tile setContentView:image_view];
|
[dock_tile setContentView:image_view];
|
||||||
|
|
|
@ -70,7 +70,7 @@ Role kRolesMap[] = {
|
||||||
// while its context menu is still open.
|
// while its context menu is still open.
|
||||||
[self cancel];
|
[self cancel];
|
||||||
|
|
||||||
model_ = NULL;
|
model_ = nullptr;
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ void ShowOpenDialog(const DialogSettings& settings,
|
||||||
|
|
||||||
NSWindow* window = settings.parent_window ?
|
NSWindow* window = settings.parent_window ?
|
||||||
settings.parent_window->GetNativeWindow() :
|
settings.parent_window->GetNativeWindow() :
|
||||||
NULL;
|
nullptr;
|
||||||
[dialog beginSheetModalForWindow:window
|
[dialog beginSheetModalForWindow:window
|
||||||
completionHandler:^(NSInteger chosen) {
|
completionHandler:^(NSInteger chosen) {
|
||||||
if (chosen == NSFileHandlingPanelCancelButton) {
|
if (chosen == NSFileHandlingPanelCancelButton) {
|
||||||
|
@ -193,7 +193,7 @@ void ShowSaveDialog(const DialogSettings& settings,
|
||||||
|
|
||||||
NSWindow* window = settings.parent_window ?
|
NSWindow* window = settings.parent_window ?
|
||||||
settings.parent_window->GetNativeWindow() :
|
settings.parent_window->GetNativeWindow() :
|
||||||
NULL;
|
nullptr;
|
||||||
[dialog beginSheetModalForWindow:window
|
[dialog beginSheetModalForWindow:window
|
||||||
completionHandler:^(NSInteger chosen) {
|
completionHandler:^(NSInteger chosen) {
|
||||||
if (chosen == NSFileHandlingPanelCancelButton) {
|
if (chosen == NSFileHandlingPanelCancelButton) {
|
||||||
|
|
|
@ -71,10 +71,10 @@ std::string MessageForOSStatus(OSStatus status, const char* default_message) {
|
||||||
// thread safe, including LSGetApplicationForURL (> 10.2) and
|
// thread safe, including LSGetApplicationForURL (> 10.2) and
|
||||||
// NSWorkspace#openURLs.
|
// NSWorkspace#openURLs.
|
||||||
std::string OpenURL(NSURL* ns_url, bool activate) {
|
std::string OpenURL(NSURL* ns_url, bool activate) {
|
||||||
CFURLRef openingApp = NULL;
|
CFURLRef openingApp = nullptr;
|
||||||
OSStatus status = LSGetApplicationForURL((CFURLRef)ns_url,
|
OSStatus status = LSGetApplicationForURL((CFURLRef)ns_url,
|
||||||
kLSRolesAll,
|
kLSRolesAll,
|
||||||
NULL,
|
nullptr,
|
||||||
&openingApp);
|
&openingApp);
|
||||||
if (status != noErr)
|
if (status != noErr)
|
||||||
return MessageForOSStatus(status, "Failed to open");
|
return MessageForOSStatus(status, "Failed to open");
|
||||||
|
@ -156,7 +156,7 @@ bool OpenItem(const base::FilePath& full_path) {
|
||||||
|
|
||||||
// Create the list of files (only ever one) to open.
|
// Create the list of files (only ever one) to open.
|
||||||
base::mac::ScopedAEDesc<AEDescList> fileList;
|
base::mac::ScopedAEDesc<AEDescList> fileList;
|
||||||
status = AECreateList(NULL, // factoringPtr
|
status = AECreateList(nullptr, // factoringPtr
|
||||||
0, // factoredSize
|
0, // factoredSize
|
||||||
false, // isRecord
|
false, // isRecord
|
||||||
fileList.OutPointer()); // resultList
|
fileList.OutPointer()); // resultList
|
||||||
|
@ -202,8 +202,8 @@ bool OpenItem(const base::FilePath& full_path) {
|
||||||
kAENoReply + kAEAlwaysInteract, // sendMode
|
kAENoReply + kAEAlwaysInteract, // sendMode
|
||||||
kAENormalPriority, // sendPriority
|
kAENormalPriority, // sendPriority
|
||||||
kAEDefaultTimeout, // timeOutInTicks
|
kAEDefaultTimeout, // timeOutInTicks
|
||||||
NULL, // idleProc
|
nullptr, // idleProc
|
||||||
NULL); // filterProc
|
nullptr); // filterProc
|
||||||
if (status != noErr) {
|
if (status != noErr) {
|
||||||
OSSTATUS_LOG(WARNING, status)
|
OSSTATUS_LOG(WARNING, status)
|
||||||
<< "Could not send AE to Finder in OpenItem()";
|
<< "Could not send AE to Finder in OpenItem()";
|
||||||
|
|
Loading…
Reference in a new issue