mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-12 14:59:44 +03:00
test: fence: Turn class member variable into local variable
The fence_ class member variable is only used locally in the FenceTest::run() function. Make it a local variable. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
This commit is contained in:
parent
0554a55427
commit
c44457957e
1 changed files with 4 additions and 4 deletions
|
@ -43,7 +43,6 @@ private:
|
|||
|
||||
void signalFence();
|
||||
|
||||
std::unique_ptr<Fence> fence_;
|
||||
EventDispatcher *dispatcher_;
|
||||
UniqueFD eventFd_;
|
||||
UniqueFD eventFd2_;
|
||||
|
@ -274,13 +273,14 @@ int FenceTest::run()
|
|||
int ret;
|
||||
if (i == expiredRequestId_) {
|
||||
/* This request will have a fence, and it will expire. */
|
||||
fence_ = std::make_unique<Fence>(std::move(eventFd_));
|
||||
if (!fence_->isValid()) {
|
||||
std::unique_ptr<Fence> fence =
|
||||
std::make_unique<Fence>(std::move(eventFd_));
|
||||
if (!fence->isValid()) {
|
||||
cerr << "Fence should be valid" << endl;
|
||||
return TestFail;
|
||||
}
|
||||
|
||||
ret = request->addBuffer(stream_, buffer.get(), std::move(fence_));
|
||||
ret = request->addBuffer(stream_, buffer.get(), std::move(fence));
|
||||
} else {
|
||||
/* All other requests will have no Fence. */
|
||||
ret = request->addBuffer(stream_, buffer.get());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue