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

Commit fbd34663 authored by Scott Randolph's avatar Scott Randolph
Browse files

Fix up result type for bit-wise or of enum values

When combining enum values with bit-wise operators, the result is no
longer of the enum type, so we need to cast it back.

Test: local compile
Change-Id: I3697d37b612f0e29aabb46a6a958ca4ef0fed64f
parent e31c6f3e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ bool mergeSubscribeOptions(const SubscribeOptions &oldOpts,
    }

    float updatedRate = std::max(oldOpts.sampleRate, newOpts.sampleRate);
    SubscribeFlags updatedFlags = oldOpts.flags | newOpts.flags;
    SubscribeFlags updatedFlags = SubscribeFlags(oldOpts.flags | newOpts.flags);

    bool updated = updatedRate > oldOpts.sampleRate
                   || updatedAreas != oldOpts.vehicleAreas