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
|
@ -5,6 +5,8 @@
|
|||
#include "shell/renderer/api/atom_api_spell_check_client.h"
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
#include <set>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
|
@ -55,7 +57,7 @@ class SpellCheckClient::SpellcheckRequest {
|
|||
const base::string16& text,
|
||||
std::unique_ptr<blink::WebTextCheckingCompletion> completion)
|
||||
: text_(text), completion_(std::move(completion)) {}
|
||||
~SpellcheckRequest() {}
|
||||
~SpellcheckRequest() = default;
|
||||
|
||||
const base::string16& text() const { return text_; }
|
||||
blink::WebTextCheckingCompletion* completion() { return completion_.get(); }
|
||||
|
@ -105,8 +107,8 @@ void SpellCheckClient::RequestCheckingOfText(
|
|||
pending_request_param_->completion()->DidCancelCheckingText();
|
||||
}
|
||||
|
||||
pending_request_param_.reset(
|
||||
new SpellcheckRequest(text, std::move(completionCallback)));
|
||||
pending_request_param_ =
|
||||
std::make_unique<SpellcheckRequest>(text, std::move(completionCallback));
|
||||
|
||||
base::ThreadTaskRunnerHandle::Get()->PostTask(
|
||||
FROM_HERE,
|
||||
|
|
|
@ -100,7 +100,7 @@ class RenderFrameStatus final : public content::RenderFrameObserver {
|
|||
public:
|
||||
explicit RenderFrameStatus(content::RenderFrame* render_frame)
|
||||
: content::RenderFrameObserver(render_frame) {}
|
||||
~RenderFrameStatus() final {}
|
||||
~RenderFrameStatus() final = default;
|
||||
|
||||
bool is_ok() { return render_frame() != nullptr; }
|
||||
|
||||
|
@ -113,7 +113,7 @@ class ScriptExecutionCallback : public blink::WebScriptExecutionCallback {
|
|||
explicit ScriptExecutionCallback(
|
||||
electron::util::Promise<v8::Local<v8::Value>> promise)
|
||||
: promise_(std::move(promise)) {}
|
||||
~ScriptExecutionCallback() override {}
|
||||
~ScriptExecutionCallback() override = default;
|
||||
|
||||
void Completed(
|
||||
const blink::WebVector<v8::Local<v8::Value>>& result) override {
|
||||
|
|
|
@ -125,7 +125,7 @@ AtomSandboxedRendererClient::AtomSandboxedRendererClient() {
|
|||
metrics_ = base::ProcessMetrics::CreateCurrentProcessMetrics();
|
||||
}
|
||||
|
||||
AtomSandboxedRendererClient::~AtomSandboxedRendererClient() {}
|
||||
AtomSandboxedRendererClient::~AtomSandboxedRendererClient() = default;
|
||||
|
||||
void AtomSandboxedRendererClient::InitializeBindings(
|
||||
v8::Local<v8::Object> binding,
|
||||
|
|
|
@ -17,7 +17,7 @@ ContentSettingsObserver::ContentSettingsObserver(
|
|||
render_frame->GetWebFrame()->SetContentSettingsClient(this);
|
||||
}
|
||||
|
||||
ContentSettingsObserver::~ContentSettingsObserver() {}
|
||||
ContentSettingsObserver::~ContentSettingsObserver() = default;
|
||||
|
||||
bool ContentSettingsObserver::AllowDatabase() {
|
||||
blink::WebFrame* frame = render_frame()->GetWebFrame();
|
||||
|
|
|
@ -106,7 +106,7 @@ RendererClientBase::RendererClientBase() {
|
|||
command_line->GetSwitchValueASCII(::switches::kRendererClientId);
|
||||
}
|
||||
|
||||
RendererClientBase::~RendererClientBase() {}
|
||||
RendererClientBase::~RendererClientBase() = default;
|
||||
|
||||
void RendererClientBase::DidCreateScriptContext(
|
||||
v8::Handle<v8::Context> context,
|
||||
|
@ -200,8 +200,8 @@ void RendererClientBase::RenderThreadStarted() {
|
|||
blink::WebSecurityPolicy::RegisterURLSchemeAsAllowingServiceWorkers("file");
|
||||
blink::SchemeRegistry::RegisterURLSchemeAsSupportingFetchAPI("file");
|
||||
|
||||
prescient_networking_dispatcher_.reset(
|
||||
new network_hints::PrescientNetworkingDispatcher());
|
||||
prescient_networking_dispatcher_ =
|
||||
std::make_unique<network_hints::PrescientNetworkingDispatcher>();
|
||||
|
||||
#if defined(OS_WIN)
|
||||
// Set ApplicationUserModelID in renderer process.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue