Modernize to C++11: NULL => nullptr.
No functional change.
This commit is contained in:
parent
9c74ea4bf4
commit
fab02809c6
29 changed files with 82 additions and 82 deletions
|
@ -21,7 +21,7 @@ namespace api {
|
|||
|
||||
Menu::Menu(v8::Isolate* isolate)
|
||||
: model_(new AtomMenuModel(this)),
|
||||
parent_(NULL) {
|
||||
parent_(nullptr) {
|
||||
}
|
||||
|
||||
Menu::~Menu() {
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
namespace mate {
|
||||
|
||||
Event::Event(v8::Isolate* isolate)
|
||||
: sender_(NULL),
|
||||
message_(NULL) {
|
||||
: sender_(nullptr),
|
||||
message_(nullptr) {
|
||||
Init(isolate);
|
||||
}
|
||||
|
||||
|
@ -31,8 +31,8 @@ void Event::SetSenderAndMessage(content::WebContents* sender,
|
|||
}
|
||||
|
||||
void Event::WebContentsDestroyed() {
|
||||
sender_ = NULL;
|
||||
message_ = NULL;
|
||||
sender_ = nullptr;
|
||||
message_ = nullptr;
|
||||
}
|
||||
|
||||
void Event::PreventDefault(v8::Isolate* isolate) {
|
||||
|
@ -41,13 +41,13 @@ void Event::PreventDefault(v8::Isolate* isolate) {
|
|||
}
|
||||
|
||||
bool Event::SendReply(const base::string16& json) {
|
||||
if (message_ == NULL || sender_ == NULL)
|
||||
if (message_ == nullptr || sender_ == nullptr)
|
||||
return false;
|
||||
|
||||
AtomViewHostMsg_Message_Sync::WriteReplyParams(message_, json);
|
||||
bool success = sender_->Send(message_);
|
||||
message_ = NULL;
|
||||
sender_ = NULL;
|
||||
message_ = nullptr;
|
||||
sender_ = nullptr;
|
||||
return success;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ void Erase(T* container, typename T::iterator iter) {
|
|||
}
|
||||
|
||||
// static
|
||||
AtomBrowserMainParts* AtomBrowserMainParts::self_ = NULL;
|
||||
AtomBrowserMainParts* AtomBrowserMainParts::self_ = nullptr;
|
||||
|
||||
AtomBrowserMainParts::AtomBrowserMainParts()
|
||||
: fake_browser_process_(new BrowserProcess),
|
||||
|
|
|
@ -43,7 +43,7 @@ void GracefulShutdownHandler(int signal) {
|
|||
struct sigaction action;
|
||||
memset(&action, 0, sizeof(action));
|
||||
action.sa_handler = SIG_DFL;
|
||||
RAW_CHECK(sigaction(signal, &action, NULL) == 0);
|
||||
RAW_CHECK(sigaction(signal, &action, nullptr) == 0);
|
||||
|
||||
RAW_CHECK(g_pipe_pid == getpid());
|
||||
RAW_CHECK(g_shutdown_pipe_write_fd != -1);
|
||||
|
@ -171,7 +171,7 @@ void AtomBrowserMainParts::HandleSIGCHLD() {
|
|||
struct sigaction action;
|
||||
memset(&action, 0, sizeof(action));
|
||||
action.sa_handler = SIGCHLDHandler;
|
||||
CHECK_EQ(sigaction(SIGCHLD, &action, NULL), 0);
|
||||
CHECK_EQ(sigaction(SIGCHLD, &action, nullptr), 0);
|
||||
}
|
||||
|
||||
void AtomBrowserMainParts::HandleShutdownSignals() {
|
||||
|
@ -211,15 +211,15 @@ void AtomBrowserMainParts::HandleShutdownSignals() {
|
|||
struct sigaction action;
|
||||
memset(&action, 0, sizeof(action));
|
||||
action.sa_handler = SIGTERMHandler;
|
||||
CHECK_EQ(sigaction(SIGTERM, &action, NULL), 0);
|
||||
CHECK_EQ(sigaction(SIGTERM, &action, nullptr), 0);
|
||||
// Also handle SIGINT - when the user terminates the browser via Ctrl+C. If
|
||||
// the browser process is being debugged, GDB will catch the SIGINT first.
|
||||
action.sa_handler = SIGINTHandler;
|
||||
CHECK_EQ(sigaction(SIGINT, &action, NULL), 0);
|
||||
CHECK_EQ(sigaction(SIGINT, &action, nullptr), 0);
|
||||
// And SIGHUP, for when the terminal disappears. On shutdown, many Linux
|
||||
// distros send SIGHUP, SIGTERM, and then SIGKILL.
|
||||
action.sa_handler = SIGHUPHandler;
|
||||
CHECK_EQ(sigaction(SIGHUP, &action, NULL), 0);
|
||||
CHECK_EQ(sigaction(SIGHUP, &action, nullptr), 0);
|
||||
}
|
||||
|
||||
} // namespace atom
|
||||
|
|
|
@ -183,7 +183,7 @@ bool URLRequestAsarJob::IsRedirectResponse(GURL* location,
|
|||
net::Filter* URLRequestAsarJob::SetupFilter() const {
|
||||
// Bug 9936 - .svgz files needs to be decompressed.
|
||||
return base::LowerCaseEqualsASCII(file_path_.Extension(), ".svgz")
|
||||
? net::Filter::GZipFactory() : NULL;
|
||||
? net::Filter::GZipFactory() : nullptr;
|
||||
}
|
||||
|
||||
bool URLRequestAsarJob::GetMimeType(std::string* mime_type) const {
|
||||
|
@ -338,7 +338,7 @@ void URLRequestAsarJob::DidRead(scoped_refptr<net::IOBuffer> buf, int result) {
|
|||
DCHECK_GE(remaining_bytes_, 0);
|
||||
}
|
||||
|
||||
buf = NULL;
|
||||
buf = nullptr;
|
||||
|
||||
ReadRawDataComplete(result);
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ void RelauncherSynchronizeWithParent() {
|
|||
|
||||
struct kevent change = { 0 };
|
||||
EV_SET(&change, parent_pid, EVFILT_PROC, EV_ADD, NOTE_EXIT, 0, NULL);
|
||||
if (kevent(kq.get(), &change, 1, NULL, 0, NULL) == -1) {
|
||||
if (kevent(kq.get(), &change, 1, nullptr, 0, nullptr) == -1) {
|
||||
PLOG(ERROR) << "kevent (add)";
|
||||
return;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ void RelauncherSynchronizeWithParent() {
|
|||
// write above to complete. The parent process is now free to exit. Wait for
|
||||
// that to happen.
|
||||
struct kevent event;
|
||||
int events = kevent(kq.get(), NULL, 0, &event, 1, NULL);
|
||||
int events = kevent(kq.get(), nullptr, 0, &event, 1, nullptr);
|
||||
if (events != 1) {
|
||||
if (events < 0) {
|
||||
PLOG(ERROR) << "kevent (monitor)";
|
||||
|
|
|
@ -17,7 +17,7 @@ base::LazyInstance<base::ObserverList<WindowListObserver>>::Leaky
|
|||
WindowList::observers_ = LAZY_INSTANCE_INITIALIZER;
|
||||
|
||||
// static
|
||||
WindowList* WindowList::instance_ = NULL;
|
||||
WindowList* WindowList::instance_ = nullptr;
|
||||
|
||||
// static
|
||||
WindowList* WindowList::GetInstance() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue