cleanup: Avoid useless return statements

Return statements are only useful if they return a value or break
the regular function flow (i.e. early returns). Remove all returns
that do neither.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
This commit is contained in:
Florian Müllner 2019-08-19 21:37:15 +02:00
parent 81ab2865f7
commit a77377efe7
5 changed files with 0 additions and 7 deletions

View File

@ -202,7 +202,6 @@ var ConsecutiveBatch = class extends Batch {
hold.disconnect(signalId); hold.disconnect(signalId);
this.nextTask(); this.nextTask();
}); });
return;
} else { } else {
// This task finished, process the next one // This task finished, process the next one
this.nextTask(); this.nextTask();

View File

@ -752,7 +752,6 @@ var AllView = class AllView extends BaseAppView {
let maxY = this._adjustment.upper - this._adjustment.page_size; let maxY = this._adjustment.upper - this._adjustment.page_size;
if (dragEvent.y >= gridBottom && currentY < maxY) { if (dragEvent.y >= gridBottom && currentY < maxY) {
this.goToPage(this._grid.currentPage + 1); this.goToPage(this._grid.currentPage + 1);
return;
} }
} }

View File

@ -705,7 +705,6 @@ function queueDeferredWork(workId) {
_deferredWorkQueue.push(workId); _deferredWorkQueue.push(workId);
if (data.actor.mapped) { if (data.actor.mapped) {
_queueBeforeRedraw(workId); _queueBeforeRedraw(workId);
return;
} else if (_deferredTimeoutId == 0) { } else if (_deferredTimeoutId == 0) {
_deferredTimeoutId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, DEFERRED_TIMEOUT_SECONDS, () => { _deferredTimeoutId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, DEFERRED_TIMEOUT_SECONDS, () => {
_runAllDeferredWork(); _runAllDeferredWork();

View File

@ -1976,7 +1976,6 @@ var NMApplet = class extends PanelMenu.SystemIndicator {
// or we get to full connectivity through other means // or we get to full connectivity through other means
} else if (result == PortalHelperResult.COMPLETED) { } else if (result == PortalHelperResult.COMPLETED) {
this._closeConnectivityCheck(path); this._closeConnectivityCheck(path);
return;
} else if (result == PortalHelperResult.RECHECK) { } else if (result == PortalHelperResult.RECHECK) {
this._client.check_connectivity_async(null, (client, result) => { this._client.check_connectivity_async(null, (client, result) => {
try { try {

View File

@ -1022,7 +1022,6 @@ var WindowManager = class {
(proxy, error) => { (proxy, error) => {
if (error) { if (error) {
log(error.message); log(error.message);
return;
} }
}); });
@ -1682,7 +1681,6 @@ var WindowManager = class {
break; break;
default: default:
shellwm.completed_map(actor); shellwm.completed_map(actor);
return;
} }
} }
@ -1763,7 +1761,6 @@ var WindowManager = class {
break; break;
default: default:
shellwm.completed_destroy(actor); shellwm.completed_destroy(actor);
return;
} }
} }