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();
Emit("quit", exitCode);
if (process_singleton_.get()) {
if (process_singleton_) {
process_singleton_->Cleanup();
process_singleton_.reset();
}
@ -695,7 +695,7 @@ std::string App::GetLocale() {
bool App::MakeSingleInstance(
const ProcessSingleton::NotificationCallback& callback) {
if (process_singleton_.get())
if (process_singleton_)
return false;
base::FilePath user_dir;
@ -716,7 +716,7 @@ bool App::MakeSingleInstance(
}
void App::ReleaseSingleInstance() {
if (process_singleton_.get()) {
if (process_singleton_) {
process_singleton_->Cleanup();
process_singleton_.reset();
}

View file

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

View file

@ -851,12 +851,12 @@ void OffScreenRenderWidgetHostView::SetupFrameRate(bool force) {
GetCompositor()->vsync_manager()->SetAuthoritativeVSyncInterval(
base::TimeDelta::FromMilliseconds(frame_rate_threshold_ms_));
if (copy_frame_generator_.get()) {
if (copy_frame_generator_) {
copy_frame_generator_->set_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_);
} else {
begin_frame_timer_.reset(new AtomBeginFrameTimer(
@ -871,7 +871,7 @@ void OffScreenRenderWidgetHostView::Invalidate() {
if (software_output_device_) {
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);
}
}