Skip to content

Commit 2c923ed

Browse files
random-zebrafurszy
authored andcommitted
scripted-diff: Replace 'NULL' with 'nullptr' in guiutil.cpp
-BEGIN VERIFY SCRIPT- sed -i 's/\<NULL\>/nullptr/g' src/qt/guiutil.cpp -END VERIFY SCRIPT- Github-Pull: #2374 Rebased-From: aad1362
1 parent 7b8b23a commit 2c923ed

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/qt/guiutil.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ bool SetStartOnSystemStartup(bool fAutoStart)
650650
fs::remove(StartupShortcutPath());
651651

652652
if (fAutoStart) {
653-
CoInitialize(NULL);
653+
CoInitialize(nullptr);
654654

655655
// Get a pointer to the IShellLink interface.
656656
IShellLinkW* psl = nullptr;
@@ -772,7 +772,7 @@ bool SetStartOnSystemStartup(bool fAutoStart)
772772
LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef findUrl);
773773
LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef findUrl)
774774
{
775-
CFArrayRef listSnapshot = LSSharedFileListCopySnapshot(list, NULL);
775+
CFArrayRef listSnapshot = LSSharedFileListCopySnapshot(list, nullptr);
776776
if (listSnapshot == nullptr) {
777777
return nullptr;
778778
}
@@ -781,17 +781,17 @@ LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef
781781
for (int i = 0; i < CFArrayGetCount(listSnapshot); i++) {
782782
LSSharedFileListItemRef item = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(listSnapshot, i);
783783
UInt32 resolutionFlags = kLSSharedFileListNoUserInteraction | kLSSharedFileListDoNotMountVolumes;
784-
CFURLRef currentItemURL = NULL;
784+
CFURLRef currentItemURL = nullptr;
785785

786786
#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED >= 10100
787787
if (&LSSharedFileListItemCopyResolvedURL)
788-
currentItemURL = LSSharedFileListItemCopyResolvedURL(item, resolutionFlags, NULL);
788+
currentItemURL = LSSharedFileListItemCopyResolvedURL(item, resolutionFlags, nullptr);
789789
#if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED < 10100
790790
else
791-
LSSharedFileListItemResolve(item, resolutionFlags, &currentItemURL, NULL);
791+
LSSharedFileListItemResolve(item, resolutionFlags, &currentItemURL, nullptr);
792792
#endif
793793
#else
794-
LSSharedFileListItemResolve(item, resolutionFlags, &currentItemURL, NULL);
794+
LSSharedFileListItemResolve(item, resolutionFlags, &currentItemURL, nullptr);
795795
#endif
796796

797797
if (currentItemURL) {
@@ -806,7 +806,7 @@ LSSharedFileListItemRef findStartupItemInList(LSSharedFileListRef list, CFURLRef
806806
}
807807

808808
CFRelease(listSnapshot);
809-
return NULL;
809+
return nullptr;
810810
}
811811

812812
bool GetStartOnSystemStartup()
@@ -816,7 +816,7 @@ bool GetStartOnSystemStartup()
816816
return false;
817817
}
818818

819-
LSSharedFileListRef loginItems = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
819+
LSSharedFileListRef loginItems = LSSharedFileListCreate(nullptr, kLSSharedFileListSessionLoginItems, nullptr);
820820
LSSharedFileListItemRef foundItem = findStartupItemInList(loginItems, bitcoinAppUrl);
821821

822822
CFRelease(bitcoinAppUrl);
@@ -830,12 +830,12 @@ bool SetStartOnSystemStartup(bool fAutoStart)
830830
return false;
831831
}
832832

833-
LSSharedFileListRef loginItems = LSSharedFileListCreate(NULL, kLSSharedFileListSessionLoginItems, NULL);
833+
LSSharedFileListRef loginItems = LSSharedFileListCreate(nullptr, kLSSharedFileListSessionLoginItems, nullptr);
834834
LSSharedFileListItemRef foundItem = findStartupItemInList(loginItems, bitcoinAppUrl);
835835

836836
if (fAutoStart && !foundItem) {
837837
// add pivx app to startup item list
838-
LSSharedFileListInsertItemURL(loginItems, kLSSharedFileListItemBeforeFirst, NULL, NULL, bitcoinAppUrl, NULL, NULL);
838+
LSSharedFileListInsertItemURL(loginItems, kLSSharedFileListItemBeforeFirst, nullptr, nullptr, bitcoinAppUrl, nullptr, nullptr);
839839
} else if (!fAutoStart && foundItem) {
840840
// remove item
841841
LSSharedFileListItemRemove(loginItems, foundItem);

0 commit comments

Comments
 (0)