cefsimple: Convert NULL to nullptr (see issue #2861)

This commit is contained in:
Marshall Greenblatt 2020-01-15 15:26:01 +01:00
parent f5eef5390a
commit b785d34d29
5 changed files with 10 additions and 10 deletions

View File

@ -39,7 +39,7 @@ int main(int argc, char* argv[]) {
// CEF applications have multiple sub-processes (render, plugin, GPU, etc)
// that share the same executable. This function checks the command-line and,
// if this is a sub-process, executes the appropriate logic.
int exit_code = CefExecuteProcess(main_args, NULL, NULL);
int exit_code = CefExecuteProcess(main_args, nullptr, nullptr);
if (exit_code >= 0) {
// The sub-process has completed so return here.
return exit_code;
@ -68,7 +68,7 @@ int main(int argc, char* argv[]) {
CefRefPtr<SimpleApp> app(new SimpleApp);
// Initialize CEF for the browser process.
CefInitialize(main_args, settings, app.get(), NULL);
CefInitialize(main_args, settings, app.get(), nullptr);
// Run the CEF message loop. This will block until CefQuitMessageLoop() is
// called.

View File

@ -30,7 +30,7 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
// Enable High-DPI support on Windows 7 or newer.
CefEnableHighDPISupport();
void* sandbox_info = NULL;
void* sandbox_info = nullptr;
#if defined(CEF_USE_SANDBOX)
// Manage the life span of the sandbox information object. This is necessary
@ -45,7 +45,7 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
// CEF applications have multiple sub-processes (render, plugin, GPU, etc)
// that share the same executable. This function checks the command-line and,
// if this is a sub-process, executes the appropriate logic.
int exit_code = CefExecuteProcess(main_args, NULL, sandbox_info);
int exit_code = CefExecuteProcess(main_args, nullptr, sandbox_info);
if (exit_code >= 0) {
// The sub-process has completed so return here.
return exit_code;

View File

@ -31,5 +31,5 @@ int main(int argc, char* argv[]) {
CefMainArgs main_args(argc, argv);
// Execute the sub-process.
return CefExecuteProcess(main_args, NULL, NULL);
return CefExecuteProcess(main_args, nullptr, nullptr);
}

View File

@ -32,7 +32,7 @@ class SimpleWindowDelegate : public CefWindowDelegate {
}
void OnWindowDestroyed(CefRefPtr<CefWindow> window) OVERRIDE {
browser_view_ = NULL;
browser_view_ = nullptr;
}
bool CanClose(CefRefPtr<CefWindow> window) OVERRIDE {
@ -91,7 +91,7 @@ void SimpleApp::OnContextInitialized() {
if (use_views) {
// Create the BrowserView.
CefRefPtr<CefBrowserView> browser_view = CefBrowserView::CreateBrowserView(
handler, url, browser_settings, NULL, NULL, NULL);
handler, url, browser_settings, nullptr, nullptr, nullptr);
// Create the Window. It will show itself after creation.
CefWindow::CreateTopLevelWindow(new SimpleWindowDelegate(browser_view));
@ -107,6 +107,6 @@ void SimpleApp::OnContextInitialized() {
// Create the first browser window.
CefBrowserHost::CreateBrowser(window_info, handler, url, browser_settings,
NULL, NULL);
nullptr, nullptr);
}
}

View File

@ -17,7 +17,7 @@
namespace {
SimpleHandler* g_instance = NULL;
SimpleHandler* g_instance = nullptr;
// Returns a data: URI with the specified contents.
std::string GetDataURI(const std::string& data, const std::string& mime_type) {
@ -35,7 +35,7 @@ SimpleHandler::SimpleHandler(bool use_views)
}
SimpleHandler::~SimpleHandler() {
g_instance = NULL;
g_instance = nullptr;
}
// static