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

Commit e958fdd5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix a type conversion bug." into udc-qpr-dev

parents 39c13bc3 ddd7b581
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ class LinearFakeValueGenerator : public FakeValueGenerator {
        float dispersion;    //  Defines minimum and maximum value based on initial value.
        float increment;     //  Value that we will be added to currentValue with each timer tick.
        int64_t interval;
        long lastEventTimestamp;
        int64_t lastEventTimestamp;
    };

    GeneratorCfg mGenCfg;
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ std::optional<VehiclePropValue> LinearFakeValueGenerator::nextEvent() {
    if (mGenCfg.lastEventTimestamp == 0) {
        mGenCfg.lastEventTimestamp = elapsedRealtimeNano();
    } else {
        long nextEventTime = mGenCfg.lastEventTimestamp + mGenCfg.interval;
        int64_t nextEventTime = mGenCfg.lastEventTimestamp + mGenCfg.interval;
        // Prevent overflow.
        assert(nextEventTime > mGenCfg.lastEventTimestamp);
        mGenCfg.lastEventTimestamp = nextEventTime;