Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 31, 2015, 12:43:34 AM (8 years ago)
Author:
landauf
Message:

made some enums in core library strongly typed. for other enums in core (especially in the input library) this isn't possible because enums are often used like flags (converted to int and compared with binary operators).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v2/src/libraries/core/command/Functor.h

    r10990 r11007  
    176176    {
    177177        public:
    178             struct Type
    179             {
    180                 /// Defines the type of a function (static or member)
    181                 enum Enum
    182                 {
    183                     Static,
    184                     Member
    185                 };
     178            /// Defines the type of a function (static or member)
     179            enum class Type
     180            {
     181                Static,
     182                Member
    186183            };
    187184
     
    196193
    197194            /// Returns the type of the function: static or member.
    198             virtual Type::Enum getType() const = 0;
     195            virtual Type getType() const = 0;
    199196            /// Returns the number of parameters of the function.
    200197            virtual unsigned int getParamCount() const = 0;
     
    262259
    263260            // see Functor::getType()
    264             virtual inline Functor::Type::Enum getType() const override
     261            virtual inline Functor::Type getType() const override
    265262                { return Functor::Type::Member; }
    266263
     
    339336
    340337            // see Functor::getType()
    341             virtual inline Functor::Type::Enum getType() const override
     338            virtual inline Functor::Type getType() const override
    342339                { return Functor::Type::Static; }
    343340
Note: See TracChangeset for help on using the changeset viewer.