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

Commit b48ae8a1 authored by Bart Van Assche's avatar Bart Van Assche
Browse files

Clean up the JetPlayer class definition



Make the following changes:
- Declare constructors 'explicit' as recommended in go/totw/142.
- Remove a set-but-not-used variable because the compiler warns about it.
- Remove the default JetPlayer constructor because defining a default
  constructor contradicts the comment that says that there is no default
  constructor.

Change-Id: I3b6addedc78e1efbced3e43de5c75cafd9ad24fc
Signed-off-by: default avatarBart Van Assche <bvanassche@google.com>
parent c33762ca
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ public:
    static const int JET_NUMQUEUEDSEGMENT_UPDATE = 3;
    static const int JET_PAUSE_UPDATE            = 4;

    JetPlayer(void *javaJetPlayer,
    explicit JetPlayer(void *javaJetPlayer,
            int maxTracks = 32,
            int trackBufferSize = 1200);
    ~JetPlayer();
@@ -69,7 +69,6 @@ private:
    void                fireUpdateOnStatusChange();
    void                fireEventsFromJetQueue();

    JetPlayer() {} // no default constructor
    void dump();
    void dumpJetStatus(S_JET_STATUS* pJetStatus);

@@ -96,7 +95,7 @@ private:

    class JetPlayerThread : public Thread {
    public:
        JetPlayerThread(JetPlayer *player) : mPlayer(player) {
        explicit JetPlayerThread(JetPlayer *player) : mPlayer(player) {
        }

    protected:
@@ -106,8 +105,7 @@ private:
        JetPlayer *mPlayer;

        bool threadLoop() {
            int result;
            result = mPlayer->render();
            mPlayer->render();
            return false;
        }