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

Commit f9bf16ae 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:...

Merge "Use std::optional instead of std::unique_ptr" am: 85486fc4 am: 17f086a9 am: 61c1e0c7 am: 91e25c38

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

Change-Id: Ibfb967b4191fe332ef9ed5b2ca3d7e219e9d2be0
parents 1e82dc4a 91e25c38
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);
            }