diff --git a/include/cinder/ImageIo.h b/include/cinder/ImageIo.h index ebf1ef8ce5..7760a3f9d9 100644 --- a/include/cinder/ImageIo.h +++ b/include/cinder/ImageIo.h @@ -44,12 +44,12 @@ typedef std::shared_ptr ImageTargetFileRef; class CI_API ImageIo { public: - typedef enum ColorModel { CM_RGB, CM_GRAY, CM_UNKNOWN } ColorModel; - typedef enum DataType { UINT8, UINT16, FLOAT32, FLOAT16, DATA_UNKNOWN } DataType; - typedef enum ChannelType { CHAN_RGB_R, CHAN_RGB_G, CHAN_RGB_B, CHAN_GRAY, CHAN_ALPHA, CHAN_MASK, CHAN_LAB_L, CHAN_LAB_A, CHAN_LAB_B, + enum ColorModel { CM_RGB, CM_GRAY, CM_UNKNOWN }; + enum DataType { UINT8, UINT16, FLOAT32, FLOAT16, DATA_UNKNOWN }; + enum ChannelType { CHAN_RGB_R, CHAN_RGB_G, CHAN_RGB_B, CHAN_GRAY, CHAN_ALPHA, CHAN_MASK, CHAN_LAB_L, CHAN_LAB_A, CHAN_LAB_B, CHAN_YUV_Y, CHAN_YUV_U, CHAN_YUV_V, CHAN_CMYK_C, CHAN_CMYK_M, CHAN_CMYK_Y, CHAN_CMYK_K, - CHAN_UNKNOWN } ChannelType; - typedef enum ChannelOrder { RGBA, BGRA, ARGB, ABGR, RGBX, BGRX, XRGB, XBGR, RGB, BGR, Y, YA, CUSTOM } ChannelOrder; // Y = Gray/Luminance, X = ignored + CHAN_UNKNOWN }; + enum ChannelOrder { RGBA, BGRA, ARGB, ABGR, RGBX, BGRX, XRGB, XBGR, RGB, BGR, Y, YA, CUSTOM }; // Y = Gray/Luminance, X = ignored int32_t getWidth() const { return mWidth; } int32_t getHeight() const { return mHeight; } diff --git a/include/cinder/Log.h b/include/cinder/Log.h index d3c94e7545..3bad83b196 100644 --- a/include/cinder/Log.h +++ b/include/cinder/Log.h @@ -49,14 +49,14 @@ namespace cinder { namespace log { -typedef enum { +enum Level { LEVEL_VERBOSE, LEVEL_DEBUG, LEVEL_INFO, LEVEL_WARNING, LEVEL_ERROR, LEVEL_FATAL -} Level; +}; struct CI_API Location { Location() {} diff --git a/include/cinder/Text.h b/include/cinder/Text.h index 22a3a862a6..d0db630465 100644 --- a/include/cinder/Text.h +++ b/include/cinder/Text.h @@ -90,7 +90,7 @@ class CI_API TextLayout { class CI_API TextBox { public: - typedef enum Alignment { LEFT, CENTER, RIGHT } Alignment; + enum Alignment { LEFT, CENTER, RIGHT }; enum { GROW = 0 }; TextBox() : mAlign( LEFT ), mSize( GROW, GROW ), mFont( Font::getDefault() ), mInvalid( true ), mColor( 1, 1, 1, 1 ), mBackgroundColor( 0, 0, 0, 0 ), mPremultiplied( false ), mLigate( true ) {} diff --git a/include/cinder/Triangulate.h b/include/cinder/Triangulate.h index 11ecef412e..ebcf19eff1 100644 --- a/include/cinder/Triangulate.h +++ b/include/cinder/Triangulate.h @@ -35,7 +35,7 @@ namespace cinder { //! Converts an arbitrary Shape2d into a TriMesh2d class CI_API Triangulator { public: - typedef enum Winding { WINDING_ODD, WINDING_NONZERO, WINDING_POSITIVE, WINDING_NEGATIVE, WINDING_ABS_GEQ_TWO } Winding; + enum Winding { WINDING_ODD, WINDING_NONZERO, WINDING_POSITIVE, WINDING_NEGATIVE, WINDING_ABS_GEQ_TWO }; //! Default constructor Triangulator(); diff --git a/include/cinder/Xml.h b/include/cinder/Xml.h index d5a936387b..6bb837c537 100644 --- a/include/cinder/Xml.h +++ b/include/cinder/Xml.h @@ -212,7 +212,7 @@ class CI_API XmlTree { }; //! Enum listing all types of XML nodes understood by the parser. - typedef enum { NODE_UNKNOWN, NODE_DOCUMENT, NODE_ELEMENT, NODE_CDATA, NODE_COMMENT, NODE_DATA } NodeType; + enum NodeType { NODE_UNKNOWN, NODE_DOCUMENT, NODE_ELEMENT, NODE_CDATA, NODE_COMMENT, NODE_DATA }; //! Default constructor, creating an empty node. XmlTree() : mParent( 0 ), mNodeType( NODE_ELEMENT ) {} diff --git a/include/cinder/app/cocoa/AppCocoaTouch.h b/include/cinder/app/cocoa/AppCocoaTouch.h index 240a614772..a6945b9c7a 100644 --- a/include/cinder/app/cocoa/AppCocoaTouch.h +++ b/include/cinder/app/cocoa/AppCocoaTouch.h @@ -173,7 +173,7 @@ class AppCocoaTouch : public AppBase { //! Retuens a pointer to the native UITextView, which can be used to customize the virtual keyboard. ::UITextView *getKeyboardTextView() const; - typedef enum StatusBarAnimation { NONE, FADE, SLIDE } StatusBarAnimation; + enum StatusBarAnimation { NONE, FADE, SLIDE }; //! Shows the system status bar void showStatusBar( StatusBarAnimation animation = StatusBarAnimation::NONE ); //! Returns whether the system status bar is visible diff --git a/include/cinder/gl/Vao.h b/include/cinder/gl/Vao.h index 74e7fce539..7f0574e6a0 100644 --- a/include/cinder/gl/Vao.h +++ b/include/cinder/gl/Vao.h @@ -63,7 +63,7 @@ class CI_API Vao : public std::enable_shared_from_this { void setLabel( const std::string &label ); struct VertexAttrib { - typedef enum { FLOAT, INTEGER } PointerType; + enum PointerType { FLOAT, INTEGER }; VertexAttrib() : mEnabled( false ), mSize( 0 ), mType( GL_FLOAT ), mNormalized( false ), mStride( 0 ), mPointer( 0 ), mArrayBufferBinding( 0 ), mDivisor( 0 ), mPointerType( FLOAT ) diff --git a/include/cinder/msw/StackWalker.h b/include/cinder/msw/StackWalker.h index f925dc4abb..e6e45187ac 100644 --- a/include/cinder/msw/StackWalker.h +++ b/include/cinder/msw/StackWalker.h @@ -52,7 +52,7 @@ class StackWalkerInternal; // forward class StackWalker { public: - typedef enum StackWalkOptions + enum StackWalkOptions { // No addition info will be retrived // (only the address is available) @@ -84,7 +84,7 @@ class StackWalker // Contains all options (default) OptionsAll = 0x3F - } StackWalkOptions; + }; StackWalker( int options = OptionsAll, // 'int' is by design, to combine the enum-flags @@ -122,7 +122,7 @@ class StackWalker protected: // Entry for each Callstack-Entry - typedef struct CallstackEntry + struct CallstackEntry { DWORD64 offset; // if 0, we have no valid entry CHAR name[STACKWALK_MAX_NAMELEN]; @@ -137,7 +137,7 @@ class StackWalker CHAR moduleName[STACKWALK_MAX_NAMELEN]; DWORD64 baseOfImage; CHAR loadedImageName[STACKWALK_MAX_NAMELEN]; - } CallstackEntry; + }; enum CallstackEntryType {firstEntry, nextEntry, lastEntry}; diff --git a/include/cinder/qtime/AvfWriter.h b/include/cinder/qtime/AvfWriter.h index 6b56bb8b5d..31051924d1 100644 --- a/include/cinder/qtime/AvfWriter.h +++ b/include/cinder/qtime/AvfWriter.h @@ -48,12 +48,12 @@ typedef std::shared_ptr MovieWriterRef; class MovieWriter { public: - typedef enum Codec { H264, JPEG + enum Codec { H264, JPEG #if ! defined( CINDER_COCOA_TOUCH ) , PRO_RES_4444, PRO_RES_422 #endif - } Codec; - typedef enum FileType { QUICK_TIME_MOVIE, MPEG4, M4V } FileType; + }; + enum FileType { QUICK_TIME_MOVIE, MPEG4, M4V }; //! Defines the encoding parameters of a MovieWriter class Format { diff --git a/include/cinder/svg/Svg.h b/include/cinder/svg/Svg.h index cc48a125e6..0c48770125 100644 --- a/include/cinder/svg/Svg.h +++ b/include/cinder/svg/Svg.h @@ -41,10 +41,10 @@ namespace cinder { namespace svg { -typedef enum { FILL_RULE_NONZERO, FILL_RULE_EVENODD } FillRule; -typedef enum { LINE_CAP_BUTT, LINE_CAP_ROUND, LINE_CAP_SQUARE } LineCap; -typedef enum { LINE_JOIN_MITER, LINE_JOIN_ROUND, LINE_JOIN_BEVEL } LineJoin; -typedef enum { WEIGHT_100, WEIGHT_200, WEIGHT_300, WEIGHT_400, WEIGHT_NORMAL = WEIGHT_400, WEIGHT_500, WEIGHT_600, WEIGHT_700, WEIGHT_BOLD = WEIGHT_700, WEIGHT_800, WEIGHT_900 } FontWeight; +enum FillRule { FILL_RULE_NONZERO, FILL_RULE_EVENODD }; +enum LineCap { LINE_CAP_BUTT, LINE_CAP_ROUND, LINE_CAP_SQUARE }; +enum LineJoin { LINE_JOIN_MITER, LINE_JOIN_ROUND, LINE_JOIN_BEVEL }; +enum FontWeight { WEIGHT_100, WEIGHT_200, WEIGHT_300, WEIGHT_400, WEIGHT_NORMAL = WEIGHT_400, WEIGHT_500, WEIGHT_600, WEIGHT_700, WEIGHT_BOLD = WEIGHT_700, WEIGHT_800, WEIGHT_900 }; class Node; class Group; diff --git a/src/cinder/gl/TextureFormatParsers.cpp b/src/cinder/gl/TextureFormatParsers.cpp index 1748db9c6d..d088669c93 100644 --- a/src/cinder/gl/TextureFormatParsers.cpp +++ b/src/cinder/gl/TextureFormatParsers.cpp @@ -188,7 +188,7 @@ void parseDds( const DataSourceRef &dataSource, TextureData *resultData ) } ; } DdPixelFormat; - typedef struct DdSurface // this is lifted and adapted from DDSURFACEDESC2 + struct DdSurface // this is lifted and adapted from DDSURFACEDESC2 { uint32_t dwSize; // size of the DDSURFACEDESC structure uint32_t dwFlags; // determines what fields are valid @@ -229,7 +229,7 @@ void parseDds( const DataSourceRef &dataSource, TextureData *resultData ) }; ddCaps2 ddsCaps; // direct draw surface capabilities uint32_t dwTextureStage; // stage in multitexture cascade - } DdSurface; + }; typedef struct { uint32_t/*DXGI_FORMAT*/ dxgiFormat;