Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 30, 2015, 10:31:43 PM (8 years ago)
Author:
landauf
Message:

using strongly typed enum in various classes in orxonox-library

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/orxonox/sound/BaseSound.h

    r10771 r11005  
    5454        virtual void pause() { this->doPause(); }
    5555
    56         bool isPlaying() const { return this->state_ == Playing; }
    57         bool isPaused()  const { return this->state_ == Paused; }
    58         bool isStopped() const { return this->state_ == Stopped; }
     56        bool isPlaying() const { return this->state_ == State::Playing; }
     57        bool isPaused()  const { return this->state_ == State::Paused; }
     58        bool isStopped() const { return this->state_ == State::Stopped; }
    5959
    6060        virtual void setSource(const std::string& source);
     
    7676
    7777    protected:
    78         enum State
     78        enum class State
    7979        {
    8080            Stopped,
     
    111111        float           volume_;
    112112        bool            bLooping_;
    113         uint8_t         state_;       // This Variable is actually of type State
     113        State           state_;       // This Variable is actually of type State
    114114        float           pitch_;
    115115
Note: See TracChangeset for help on using the changeset viewer.