Bug 1540748 - part0 : mark functions const. r=jya

There functions won't change any internal variables, so they should be marked as const.

Differential Revision: https://phabricator.services.mozilla.com/D29590

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alastor Wu 2019-05-02 00:51:54 +00:00
parent 5f24a04aa2
commit 01946df64d

View File

@ -49,14 +49,16 @@ class RemoteDataDecoder : public MediaDataDecoder,
void ReturnDecodedData();
void DrainComplete();
void Error(const MediaResult& aError);
void AssertOnTaskQueue() { MOZ_ASSERT(mTaskQueue->IsCurrentThreadIn()); }
void AssertOnTaskQueue() const {
MOZ_ASSERT(mTaskQueue->IsCurrentThreadIn());
}
enum class State { DRAINED, DRAINABLE, DRAINING, SHUTDOWN };
void SetState(State aState) {
AssertOnTaskQueue();
mState = aState;
}
State GetState() {
State GetState() const {
AssertOnTaskQueue();
return mState;
}