refactor: run clang-tidy (#20231)
* refactor: clang-tidy modernize-use-nullptr * refactor: clang-tidy modernize-use-equals-default * refactor: clang-tidy modernize-make-unique * refactor: omit nullptr arg from unique_ptr.reset() As per comment by @miniak
This commit is contained in:
parent
660e566201
commit
2b316f3843
93 changed files with 261 additions and 223 deletions
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include "shell/browser/api/atom_api_app.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -941,9 +943,9 @@ std::string App::GetLocaleCountryCode() {
|
|||
kCFStringEncodingUTF8);
|
||||
region = temporaryCString;
|
||||
#else
|
||||
const char* locale_ptr = setlocale(LC_TIME, NULL);
|
||||
const char* locale_ptr = setlocale(LC_TIME, nullptr);
|
||||
if (!locale_ptr)
|
||||
locale_ptr = setlocale(LC_NUMERIC, NULL);
|
||||
locale_ptr = setlocale(LC_NUMERIC, nullptr);
|
||||
if (locale_ptr) {
|
||||
std::string locale = locale_ptr;
|
||||
std::string::size_type rpos = locale.find('.');
|
||||
|
@ -977,8 +979,8 @@ bool App::RequestSingleInstanceLock() {
|
|||
|
||||
auto cb = base::BindRepeating(&App::OnSecondInstance, base::Unretained(this));
|
||||
|
||||
process_singleton_.reset(new ProcessSingleton(
|
||||
user_dir, base::BindRepeating(NotificationCallbackWrapper, cb)));
|
||||
process_singleton_ = std::make_unique<ProcessSingleton>(
|
||||
user_dir, base::BindRepeating(NotificationCallbackWrapper, cb));
|
||||
|
||||
switch (process_singleton_->NotifyOtherProcessOrCreate()) {
|
||||
case ProcessSingleton::NotifyResult::LOCK_ERROR:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue