Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 406a285a authored by George Burgess IV's avatar George Burgess IV
Browse files

surfaceflinger: fix static analyzer complaints

Due to https://bugs.llvm.org/show_bug.cgi?id=34365, the static analyzer
complains about use of copied `sp`s. In this case, the copy is entirely
unnecessary, since we're just going to destroy the copied-from sp
anyway.

Speed things up a bit + appease the analyzer by moving instead.

Bug: 27101951
Test: mma. Static analyzer no longer complains.
Change-Id: Idf45abcc5c9b3694ef710e330e88a7c2fd766929
parent 5b843179
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2144,7 +2144,7 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags)
                    sp<const DisplayDevice> hw(mDisplays[dpy]);
                    if (hw->getLayerStack() == currentlayerStack) {
                        if (disp == NULL) {
                            disp = hw;
                            disp = std::move(hw);
                        } else {
                            disp = NULL;
                            break;