Remove redundant calls to smart pointer's get method.

This commit is contained in:
Haojian Wu 2017-03-30 22:22:40 +02:00
parent d425b63b0d
commit 1b9780035c
3 changed files with 7 additions and 7 deletions

View file

@ -520,7 +520,7 @@ void App::OnQuit() {
int exitCode = AtomBrowserMainParts::Get()->GetExitCode(); int exitCode = AtomBrowserMainParts::Get()->GetExitCode();
Emit("quit", exitCode); Emit("quit", exitCode);
if (process_singleton_.get()) { if (process_singleton_) {
process_singleton_->Cleanup(); process_singleton_->Cleanup();
process_singleton_.reset(); process_singleton_.reset();
} }
@ -695,7 +695,7 @@ std::string App::GetLocale() {
bool App::MakeSingleInstance( bool App::MakeSingleInstance(
const ProcessSingleton::NotificationCallback& callback) { const ProcessSingleton::NotificationCallback& callback) {
if (process_singleton_.get()) if (process_singleton_)
return false; return false;
base::FilePath user_dir; base::FilePath user_dir;
@ -716,7 +716,7 @@ bool App::MakeSingleInstance(
} }
void App::ReleaseSingleInstance() { void App::ReleaseSingleInstance() {
if (process_singleton_.get()) { if (process_singleton_) {
process_singleton_->Cleanup(); process_singleton_->Cleanup();
process_singleton_.reset(); process_singleton_.reset();
} }

View file

@ -402,7 +402,7 @@ void AtomNetworkDelegate::OnListenerResultInIO(
if (!base::ContainsKey(callbacks_, id)) if (!base::ContainsKey(callbacks_, id))
return; return;
ReadFromResponseObject(*response.get(), out); ReadFromResponseObject(*response, out);
bool cancel = false; bool cancel = false;
response->GetBoolean("cancel", &cancel); response->GetBoolean("cancel", &cancel);

View file

@ -851,12 +851,12 @@ void OffScreenRenderWidgetHostView::SetupFrameRate(bool force) {
GetCompositor()->vsync_manager()->SetAuthoritativeVSyncInterval( GetCompositor()->vsync_manager()->SetAuthoritativeVSyncInterval(
base::TimeDelta::FromMilliseconds(frame_rate_threshold_ms_)); base::TimeDelta::FromMilliseconds(frame_rate_threshold_ms_));
if (copy_frame_generator_.get()) { if (copy_frame_generator_) {
copy_frame_generator_->set_frame_rate_threshold_ms( copy_frame_generator_->set_frame_rate_threshold_ms(
frame_rate_threshold_ms_); frame_rate_threshold_ms_);
} }
if (begin_frame_timer_.get()) { if (begin_frame_timer_) {
begin_frame_timer_->SetFrameRateThresholdMs(frame_rate_threshold_ms_); begin_frame_timer_->SetFrameRateThresholdMs(frame_rate_threshold_ms_);
} else { } else {
begin_frame_timer_.reset(new AtomBeginFrameTimer( begin_frame_timer_.reset(new AtomBeginFrameTimer(
@ -871,7 +871,7 @@ void OffScreenRenderWidgetHostView::Invalidate() {
if (software_output_device_) { if (software_output_device_) {
software_output_device_->OnPaint(bounds_in_pixels); software_output_device_->OnPaint(bounds_in_pixels);
} else if (copy_frame_generator_.get()) { } else if (copy_frame_generator_) {
copy_frame_generator_->GenerateCopyFrame(true, bounds_in_pixels); copy_frame_generator_->GenerateCopyFrame(true, bounds_in_pixels);
} }
} }