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

Skip to content
Commit 045a30e0 authored by Shuangxi Xiang's avatar Shuangxi Xiang
Browse files

NewBufferCount'value changed:simplifying the steps of applying for new buffers

In Commit:0a3e7847, the calculation method of newBufferCount was modified from newBufferCount = mCore->mFreeSlots.size(); to newBufferCount = mCore->mFreeSlots.empty() ? 0 : 1;. When the value of newBufferCount is 0, it means that the maximum number of GB has been applied for. At this time, no new GB will be applied for and the code will be returned directly. The maximum value of newBufferCount is 1, and the subsequent steps of applying for a new buffer will only be executed once. So the for loop can be removed here to simplify the code.

Change-Id: I6c72d7c9a672dc091bd462d384481bed5f88e226
Signed-off-by:
Shuangxi Xiang <xiangshuangxi@xiaomi.corp-partner.google.com>
parent 0c014546
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment