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:
Charles Kerr 2019-09-16 18:12:00 -04:00 committed by GitHub
parent 660e566201
commit 2b316f3843
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
93 changed files with 261 additions and 223 deletions

View file

@ -179,9 +179,9 @@ void AppendDelimitedSwitchToVector(const base::StringPiece cmd_switch,
} // namespace
AtomContentClient::AtomContentClient() {}
AtomContentClient::AtomContentClient() = default;
AtomContentClient::~AtomContentClient() {}
AtomContentClient::~AtomContentClient() = default;
base::string16 AtomContentClient::GetLocalizedString(int message_id) {
return l10n_util::GetStringUTF16(message_id);

View file

@ -126,9 +126,9 @@ void LoadResourceBundle(const std::string& locale) {
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
}
AtomMainDelegate::AtomMainDelegate() {}
AtomMainDelegate::AtomMainDelegate() = default;
AtomMainDelegate::~AtomMainDelegate() {}
AtomMainDelegate::~AtomMainDelegate() = default;
bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
auto* command_line = base::CommandLine::ForCurrentProcess();
@ -283,12 +283,12 @@ void AtomMainDelegate::PreCreateMainMessageLoop() {
}
content::ContentBrowserClient* AtomMainDelegate::CreateContentBrowserClient() {
browser_client_.reset(new AtomBrowserClient);
browser_client_ = std::make_unique<AtomBrowserClient>();
return browser_client_.get();
}
content::ContentGpuClient* AtomMainDelegate::CreateContentGpuClient() {
gpu_client_.reset(new AtomGpuClient);
gpu_client_ = std::make_unique<AtomGpuClient>();
return gpu_client_.get();
}
@ -297,16 +297,16 @@ AtomMainDelegate::CreateContentRendererClient() {
auto* command_line = base::CommandLine::ForCurrentProcess();
if (IsSandboxEnabled(command_line)) {
renderer_client_.reset(new AtomSandboxedRendererClient);
renderer_client_ = std::make_unique<AtomSandboxedRendererClient>();
} else {
renderer_client_.reset(new AtomRendererClient);
renderer_client_ = std::make_unique<AtomRendererClient>();
}
return renderer_client_.get();
}
content::ContentUtilityClient* AtomMainDelegate::CreateContentUtilityClient() {
utility_client_.reset(new AtomContentUtilityClient);
utility_client_ = std::make_unique<AtomContentUtilityClient>();
return utility_client_.get();
}