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

Commit a37aaa27 authored by Andy Hung's avatar Andy Hung
Browse files

FastThread: Remove unused NBLog variable

Test: Compile and verify NBLog
Change-Id: I145eb480415b076b7f75d266df35fc945563a364
parent ea055e6d
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -66,8 +66,6 @@ FastThread::FastThread(const char *cycleMs, const char *loadUs) : Thread(false /
    /* mMeasuredWarmupTs({0, 0}), */
    mWarmupCycles(0),
    mWarmupConsecutiveInRangeCycles(0),
    mDummyNBLogWriter(new NBLog::Writer()),
    mNBLogWriter(mDummyNBLogWriter.get()),
    mTimestampStatus(INVALID_OPERATION),

    mCommand(FastThreadState::INITIAL),
@@ -124,10 +122,9 @@ bool FastThread::threadLoop()

            // As soon as possible of learning of a new dump area, start using it
            mDumpState = next->mDumpState != NULL ? next->mDumpState : mDummyDumpState;
            mNBLogWriter = next->mNBLogWriter != NULL ?
            tlNBLogWriter = next->mNBLogWriter != NULL ?
                    next->mNBLogWriter : mDummyNBLogWriter.get();
            setNBLogWriter(mNBLogWriter);   // FastMixer informs its AudioMixer, FastCapture ignores
            tlNBLogWriter = mNBLogWriter;
            setNBLogWriter(tlNBLogWriter); // FastMixer informs its AudioMixer, FastCapture ignores

            // We want to always have a valid reference to the previous (non-idle) state.
            // However, the state queue only guarantees access to current and previous states.
+1 −3
Original line number Diff line number Diff line
@@ -81,9 +81,7 @@ protected:
    struct timespec   mMeasuredWarmupTs;  // how long did it take for warmup to complete
    uint32_t          mWarmupCycles;  // counter of number of loop cycles during warmup phase
    uint32_t          mWarmupConsecutiveInRangeCycles;    // number of consecutive cycles in range
    sp<NBLog::Writer> mDummyNBLogWriter;
    NBLog::Writer*    mNBLogWriter;   // always non-nullptr: real NBLog::Writer* or
                                      // mDummyNBLogWriter.get()
    const sp<NBLog::Writer> mDummyNBLogWriter{new NBLog::Writer()};
    status_t          mTimestampStatus;

    FastThreadState::Command mCommand;