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

Skip to content
Commit 9dfa2641 authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

PatchPanel: follow up to remove false warning from ~Patch

When a new patch is being added to mPatches in this line:

    mPatches.insert(std::make_pair(*handle, std::move(newPatch)));

the source of the move--`newPatch` remains intact, and if it
is a software patch, it has playback and record patch handles
remaining to be non-NONE values. Thus, on destruction it falsely
warns that it hasn't been cleared.

The solution is to define a move constructor for Endpoint which
"transfers" patch handle ownership.

Also delete copy constructors to make sure that each Patch is
a unique resource.

Test: create a software patch, watch logcat
Change-Id: I41ea2dff087696252132e79d827e705378baaf8f
parent 99c58a82
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