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

Commit 23622cc0 authored by Surbhi Kadam's avatar Surbhi Kadam
Browse files

Avoid multiple allocations when pushing to the earlyWakeupInfos vector


Bug: 419088315
Flag: EXEMPT; refactor
Test: presubmit
Change-Id: I2d4d4cbee7ae74219b4d1705074772e74e5330f1
parent 05e2a8b6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -206,6 +206,7 @@ status_t BnSurfaceComposer::onTransact(
            count = 0;
            SAFE_PARCEL_READ_SIZE(data.readUint32, &count, data.dataSize());
            std::vector<gui::EarlyWakeupInfo> earlyWakeupInfos;
            earlyWakeupInfos.reserve(count);
            for (size_t i = 0; i < count; i++) {
                gui::EarlyWakeupInfo e;
                e.readFromParcel(&data);