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

Commit 61c1e0c7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Use std::optional instead of std::unique_ptr" am: 85486fc4 am: 17f086a9

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1501913

Change-Id: I8b3b9a6f271a7b69610e6efb5fa265e395cdff2e
parents 003f41fa 17f086a9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -205,11 +205,11 @@ public:
private:
    status_t readFloatVector(
            const Parcel* parcel, Vector<float> *vectorPtr, size_t defaultLength) {
        std::unique_ptr<std::vector<float>> v;
        std::optional<std::vector<float>> v;
        status_t result = parcel->readFloatVector(&v);
        if (result != OK) return result;
        vectorPtr->clear();
        if (v.get() != nullptr) {
        if (v) {
            for (const auto& iter : *v) {
                vectorPtr->push_back(iter);
            }