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

Commit 85486fc4 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Use std::optional instead of std::unique_ptr"

parents 68ca207b 9d2a0c78
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);
            }