Browse Source

Removed superfluous template parameter from EnumSet typedefs.

Because with GCC 4.7 we can.
pull/59/head
Vladimír Vondruš 12 years ago
parent
commit
cbe63c7a04
  1. 4
      src/Magnum/AbstractFramebuffer.h
  2. 6
      src/Magnum/AbstractShaderProgram.h
  3. 2
      src/Magnum/Audio/AbstractImporter.h
  4. 2
      src/Magnum/Buffer.h
  5. 4
      src/Magnum/Context.h
  6. 6
      src/Magnum/Platform/AbstractXApplication.h
  7. 4
      src/Magnum/Platform/AndroidApplication.h
  8. 6
      src/Magnum/Platform/GlutApplication.h
  9. 6
      src/Magnum/Platform/NaClApplication.h
  10. 4
      src/Magnum/Platform/Screen.h
  11. 14
      src/Magnum/Platform/Sdl2Application.h
  12. 2
      src/Magnum/Primitives/Cylinder.h
  13. 2
      src/Magnum/SceneGraph/AbstractFeature.h
  14. 2
      src/Magnum/SceneGraph/Object.h
  15. 4
      src/Magnum/Shaders/Flat.h
  16. 2
      src/Magnum/Shaders/MeshVisualizer.h
  17. 2
      src/Magnum/Shaders/Phong.h
  18. 2
      src/Magnum/Text/AbstractFont.h
  19. 2
      src/Magnum/Text/AbstractFontConverter.h
  20. 2
      src/Magnum/Trade/AbstractImageConverter.h
  21. 2
      src/Magnum/Trade/AbstractImporter.h
  22. 2
      src/Magnum/Trade/PhongMaterialData.h

4
src/Magnum/AbstractFramebuffer.h

@ -53,7 +53,7 @@ enum class FramebufferClear: GLbitfield {
@see @ref AbstractFramebuffer::clear() @see @ref AbstractFramebuffer::clear()
*/ */
typedef Containers::EnumSet<FramebufferClear, GLbitfield, typedef Containers::EnumSet<FramebufferClear,
GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT> FramebufferClearMask; GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT> FramebufferClearMask;
/** /**
@ -95,7 +95,7 @@ enum class FramebufferBlit: GLbitfield {
@requires_gles30 %Extension @es_extension{ANGLE,framebuffer_blit} or @requires_gles30 %Extension @es_extension{ANGLE,framebuffer_blit} or
@es_extension{NV,framebuffer_blit} in OpenGL ES 2.0 @es_extension{NV,framebuffer_blit} in OpenGL ES 2.0
*/ */
typedef Containers::EnumSet<FramebufferBlit, GLbitfield, typedef Containers::EnumSet<FramebufferBlit,
GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT> FramebufferBlitMask; GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT> FramebufferBlitMask;
/** /**

6
src/Magnum/AbstractShaderProgram.h

@ -1122,7 +1122,7 @@ template<UnsignedInt location, class T> class AbstractShaderProgram::Attribute {
* @see @ref Attribute() * @see @ref Attribute()
*/ */
#ifdef DOXYGEN_GENERATING_OUTPUT #ifdef DOXYGEN_GENERATING_OUTPUT
typedef typename Containers::EnumSet<DataOption, UnsignedByte> DataOptions; typedef typename Containers::EnumSet<DataOption> DataOptions;
#else #else
typedef typename Implementation::Attribute<T>::DataOptions DataOptions; typedef typename Implementation::Attribute<T>::DataOptions DataOptions;
#endif #endif
@ -1269,7 +1269,7 @@ struct FloatAttribute {
enum class DataOption: UnsignedByte { enum class DataOption: UnsignedByte {
Normalized = 1 << 0 Normalized = 1 << 0
}; };
typedef Containers::EnumSet<DataOption, UnsignedByte> DataOptions; typedef Containers::EnumSet<DataOption> DataOptions;
static UnsignedInt MAGNUM_EXPORT size(GLint components, DataType dataType); static UnsignedInt MAGNUM_EXPORT size(GLint components, DataType dataType);
}; };
@ -1294,7 +1294,7 @@ struct IntAttribute {
constexpr static DataType DefaultDataType = DataType::Int; constexpr static DataType DefaultDataType = DataType::Int;
enum class DataOption: UnsignedByte {}; enum class DataOption: UnsignedByte {};
typedef Containers::EnumSet<DataOption, UnsignedByte> DataOptions; typedef Containers::EnumSet<DataOption> DataOptions;
static UnsignedInt MAGNUM_EXPORT size(GLint components, DataType dataType); static UnsignedInt MAGNUM_EXPORT size(GLint components, DataType dataType);
}; };

2
src/Magnum/Audio/AbstractImporter.h

@ -79,7 +79,7 @@ class MAGNUM_AUDIO_EXPORT AbstractImporter: public PluginManager::AbstractPlugin
* *
* @see @ref features() * @see @ref features()
*/ */
typedef Containers::EnumSet<Feature, UnsignedByte> Features; typedef Containers::EnumSet<Feature> Features;
/** @brief Default constructor */ /** @brief Default constructor */
explicit AbstractImporter(); explicit AbstractImporter();

2
src/Magnum/Buffer.h

@ -434,7 +434,7 @@ class MAGNUM_EXPORT Buffer: public AbstractObject {
* @requires_gles30 %Extension @es_extension{EXT,map_buffer_range} in * @requires_gles30 %Extension @es_extension{EXT,map_buffer_range} in
* OpenGL ES 2.0 * OpenGL ES 2.0
*/ */
typedef Containers::EnumSet<MapFlag, GLbitfield> MapFlags; typedef Containers::EnumSet<MapFlag> MapFlags;
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
/** /**

4
src/Magnum/Context.h

@ -160,14 +160,14 @@ class MAGNUM_EXPORT Context {
* *
* @see @ref resetState() * @see @ref resetState()
*/ */
typedef Containers::EnumSet<State, UnsignedInt> States; typedef Containers::EnumSet<State> States;
/** /**
* @brief %Context flags * @brief %Context flags
* *
* @see @ref flags() * @see @ref flags()
*/ */
typedef Containers::EnumSet<Flag, GLint> Flags; typedef Containers::EnumSet<Flag> Flags;
/** /**
* @brief Constructor * @brief Constructor

6
src/Magnum/Platform/AbstractXApplication.h

@ -174,7 +174,7 @@ class AbstractXApplication {
Exit = 1 << 1 Exit = 1 << 1
}; };
typedef Containers::EnumSet<Flag, unsigned int> Flags; typedef Containers::EnumSet<Flag> Flags;
CORRADE_ENUMSET_FRIEND_OPERATORS(Flags) CORRADE_ENUMSET_FRIEND_OPERATORS(Flags)
Display* display; Display* display;
@ -272,7 +272,7 @@ class AbstractXApplication::InputEvent {
* *
* @see @ref modifiers() * @see @ref modifiers()
*/ */
typedef Containers::EnumSet<Modifier, unsigned int> Modifiers; typedef Containers::EnumSet<Modifier> Modifiers;
/** /**
* @brief Mouse button * @brief Mouse button
@ -290,7 +290,7 @@ class AbstractXApplication::InputEvent {
* *
* @see @ref buttons() * @see @ref buttons()
*/ */
typedef Containers::EnumSet<Button, unsigned int> Buttons; typedef Containers::EnumSet<Button> Buttons;
/** @brief Copying is not allowed */ /** @brief Copying is not allowed */
InputEvent(const InputEvent&) = delete; InputEvent(const InputEvent&) = delete;

4
src/Magnum/Platform/AndroidApplication.h

@ -294,7 +294,7 @@ class AndroidApplication {
enum class Flag: UnsignedByte { enum class Flag: UnsignedByte {
Redraw = 1 << 0 Redraw = 1 << 0
}; };
typedef Containers::EnumSet<Flag, UnsignedByte> Flags; typedef Containers::EnumSet<Flag> Flags;
static void commandEvent(android_app* state, std::int32_t cmd); static void commandEvent(android_app* state, std::int32_t cmd);
static std::int32_t inputEvent(android_app* state, AInputEvent* event); static std::int32_t inputEvent(android_app* state, AInputEvent* event);
@ -539,7 +539,7 @@ class AndroidApplication::MouseMoveEvent: public InputEvent {
* *
* @see @ref buttons() * @see @ref buttons()
*/ */
typedef Containers::EnumSet<Button, std::int32_t> Buttons; typedef Containers::EnumSet<Button> Buttons;
/** @brief Position */ /** @brief Position */
Vector2i position() const { Vector2i position() const {

6
src/Magnum/Platform/GlutApplication.h

@ -295,9 +295,9 @@ class GlutApplication::Configuration {
* @see @ref setFlags() * @see @ref setFlags()
*/ */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
typedef Containers::EnumSet<Flag, int, GLUT_DEBUG> Flags; typedef Containers::EnumSet<Flag, GLUT_DEBUG> Flags;
#else #else
typedef Containers::EnumSet<Flag, int> Flags; typedef Containers::EnumSet<Flag> Flags;
#endif #endif
/*implicit*/ Configuration(); /*implicit*/ Configuration();
@ -583,7 +583,7 @@ class GlutApplication::MouseMoveEvent: public GlutApplication::InputEvent {
* *
* @see @ref buttons() * @see @ref buttons()
*/ */
typedef Containers::EnumSet<Button, UnsignedByte> Buttons; typedef Containers::EnumSet<Button> Buttons;
/** @brief Position */ /** @brief Position */
constexpr Vector2i position() const { return _position; } constexpr Vector2i position() const { return _position; }

6
src/Magnum/Platform/NaClApplication.h

@ -360,7 +360,7 @@ class NaClApplication: public pp::Instance, public pp::Graphics3DClient, public
WillBeFullscreen = 1 << 3, WillBeFullscreen = 1 << 3,
MouseLocked = 1 << 4 MouseLocked = 1 << 4
}; };
typedef Containers::EnumSet<Flag, UnsignedByte> Flags; typedef Containers::EnumSet<Flag> Flags;
void Graphics3DContextLost() override { void Graphics3DContextLost() override {
CORRADE_ASSERT(false, "NaClApplication: context unexpectedly lost", ); CORRADE_ASSERT(false, "NaClApplication: context unexpectedly lost", );
@ -482,7 +482,7 @@ class NaClApplication::InputEvent {
* *
* @see @ref modifiers() * @see @ref modifiers()
*/ */
typedef Containers::EnumSet<Modifier, std::uint32_t> Modifiers; typedef Containers::EnumSet<Modifier> Modifiers;
/** /**
* @brief Mouse button * @brief Mouse button
@ -500,7 +500,7 @@ class NaClApplication::InputEvent {
* *
* @see @ref buttons() * @see @ref buttons()
*/ */
typedef Containers::EnumSet<Button, std::uint32_t> Buttons; typedef Containers::EnumSet<Button> Buttons;
/** @brief Copying is not allowed */ /** @brief Copying is not allowed */
InputEvent(const InputEvent&) = delete; InputEvent(const InputEvent&) = delete;

4
src/Magnum/Platform/Screen.h

@ -41,7 +41,7 @@ namespace Implementation {
Input = 1 << 1 Input = 1 << 1
}; };
typedef Containers::EnumSet<PropagatedScreenEvent, UnsignedByte> PropagatedScreenEvents; typedef Containers::EnumSet<PropagatedScreenEvent> PropagatedScreenEvents;
CORRADE_ENUMSET_OPERATORS(PropagatedScreenEvents) CORRADE_ENUMSET_OPERATORS(PropagatedScreenEvents)
} }
@ -101,7 +101,7 @@ template<class Application> class BasicScreen: private Containers::LinkedListIte
* *
* @see @ref setPropagatedEvents() * @see @ref setPropagatedEvents()
*/ */
typedef Containers::EnumSet<PropagatedEvent, UnsignedByte> PropagatedEvents; typedef Containers::EnumSet<PropagatedEvent> PropagatedEvents;
#else #else
typedef Implementation::PropagatedScreenEvent PropagatedEvent; typedef Implementation::PropagatedScreenEvent PropagatedEvent;
typedef Implementation::PropagatedScreenEvents PropagatedEvents; typedef Implementation::PropagatedScreenEvents PropagatedEvents;

14
src/Magnum/Platform/Sdl2Application.h

@ -389,7 +389,7 @@ class Sdl2Application {
#endif #endif
}; };
typedef Containers::EnumSet<Flag, UnsignedByte> Flags; typedef Containers::EnumSet<Flag> Flags;
CORRADE_ENUMSET_FRIEND_OPERATORS(Flags) CORRADE_ENUMSET_FRIEND_OPERATORS(Flags)
#ifdef CORRADE_TARGET_EMSCRIPTEN #ifdef CORRADE_TARGET_EMSCRIPTEN
@ -445,10 +445,10 @@ class Sdl2Application::Configuration {
* @see @ref setFlags() * @see @ref setFlags()
*/ */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
typedef Containers::EnumSet<Flag, int, SDL_GL_CONTEXT_DEBUG_FLAG| typedef Containers::EnumSet<Flag, SDL_GL_CONTEXT_DEBUG_FLAG|
SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG> Flags; SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG> Flags;
#else #else
typedef Containers::EnumSet<Flag, int> Flags; typedef Containers::EnumSet<Flag> Flags;
#endif #endif
#endif #endif
@ -472,11 +472,11 @@ class Sdl2Application::Configuration {
* @see @ref setWindowFlags() * @see @ref setWindowFlags()
*/ */
#ifndef DOXYGEN_GENERATING_OUTPUT #ifndef DOXYGEN_GENERATING_OUTPUT
typedef Containers::EnumSet<WindowFlag, Uint32, SDL_WINDOW_RESIZABLE| typedef Containers::EnumSet<WindowFlag, SDL_WINDOW_RESIZABLE|
SDL_WINDOW_FULLSCREEN|SDL_WINDOW_HIDDEN|SDL_WINDOW_MAXIMIZED| SDL_WINDOW_FULLSCREEN|SDL_WINDOW_HIDDEN|SDL_WINDOW_MAXIMIZED|
SDL_WINDOW_MINIMIZED|SDL_WINDOW_INPUT_GRABBED> WindowFlags; SDL_WINDOW_MINIMIZED|SDL_WINDOW_INPUT_GRABBED> WindowFlags;
#else #else
typedef Containers::EnumSet<WindowFlag, Uint32> WindowFlags; typedef Containers::EnumSet<WindowFlag> WindowFlags;
#endif #endif
/*implicit*/ Configuration(); /*implicit*/ Configuration();
@ -648,7 +648,7 @@ class Sdl2Application::InputEvent {
* @see @ref KeyEvent::modifiers(), @ref MouseEvent::modifiers(), * @see @ref KeyEvent::modifiers(), @ref MouseEvent::modifiers(),
* @ref MouseMoveEvent::modifiers() * @ref MouseMoveEvent::modifiers()
*/ */
typedef Containers::EnumSet<Modifier, Uint16> Modifiers; typedef Containers::EnumSet<Modifier> Modifiers;
/** @brief Copying is not allowed */ /** @brief Copying is not allowed */
InputEvent(const InputEvent&) = delete; InputEvent(const InputEvent&) = delete;
@ -857,7 +857,7 @@ class Sdl2Application::MouseMoveEvent: public Sdl2Application::InputEvent {
* *
* @see @ref buttons() * @see @ref buttons()
*/ */
typedef Containers::EnumSet<Button, Uint32> Buttons; typedef Containers::EnumSet<Button> Buttons;
/** @brief Position */ /** @brief Position */
constexpr Vector2i position() const { return _position; } constexpr Vector2i position() const { return _position; }

2
src/Magnum/Primitives/Cylinder.h

@ -59,7 +59,7 @@ class MAGNUM_PRIMITIVES_EXPORT Cylinder {
* *
* @see @ref solid(), @ref wireframe() * @see @ref solid(), @ref wireframe()
*/ */
typedef Containers::EnumSet<Flag, int> Flags; typedef Containers::EnumSet<Flag> Flags;
/** /**
* @brief Solid cylinder * @brief Solid cylinder

2
src/Magnum/SceneGraph/AbstractFeature.h

@ -71,7 +71,7 @@ enum class CachedTransformation: UnsignedByte {
@see @ref scenegraph-caching, @ref AbstractFeature::setCachedTransformations(), @see @ref scenegraph-caching, @ref AbstractFeature::setCachedTransformations(),
@ref AbstractFeature::clean(), @ref AbstractFeature::cleanInverted() @ref AbstractFeature::clean(), @ref AbstractFeature::cleanInverted()
*/ */
typedef Containers::EnumSet<CachedTransformation, UnsignedByte> CachedTransformations; typedef Containers::EnumSet<CachedTransformation> CachedTransformations;
CORRADE_ENUMSET_OPERATORS(CachedTransformations) CORRADE_ENUMSET_OPERATORS(CachedTransformations)

2
src/Magnum/SceneGraph/Object.h

@ -44,7 +44,7 @@ namespace Implementation {
Joint = 1 << 2 Joint = 1 << 2
}; };
typedef Containers::EnumSet<ObjectFlag, UnsignedByte> ObjectFlags; typedef Containers::EnumSet<ObjectFlag> ObjectFlags;
CORRADE_ENUMSET_OPERATORS(ObjectFlags) CORRADE_ENUMSET_OPERATORS(ObjectFlags)
} }

4
src/Magnum/Shaders/Flat.h

@ -40,7 +40,7 @@ namespace Magnum { namespace Shaders {
namespace Implementation { namespace Implementation {
enum class FlatFlag: UnsignedByte { Textured = 1 << 0 }; enum class FlatFlag: UnsignedByte { Textured = 1 << 0 };
typedef Containers::EnumSet<FlatFlag, UnsignedByte> FlatFlags; typedef Containers::EnumSet<FlatFlag> FlatFlags;
} }
/** /**
@ -97,7 +97,7 @@ template<UnsignedInt dimensions> class MAGNUM_SHADERS_EXPORT Flat: public Abstra
* *
* @see @ref flags() * @see @ref flags()
*/ */
typedef Containers::EnumSet<Flag, UnsignedByte> Flags; typedef Containers::EnumSet<Flag> Flags;
#else #else
typedef Implementation::FlatFlag Flag; typedef Implementation::FlatFlag Flag;
typedef Implementation::FlatFlags Flags; typedef Implementation::FlatFlags Flags;

2
src/Magnum/Shaders/MeshVisualizer.h

@ -106,7 +106,7 @@ class MAGNUM_SHADERS_EXPORT MeshVisualizer: public AbstractShaderProgram {
}; };
/** @brief %Flags */ /** @brief %Flags */
typedef Containers::EnumSet<Flag, UnsignedByte> Flags; typedef Containers::EnumSet<Flag> Flags;
/** /**
* @brief Constructor * @brief Constructor

2
src/Magnum/Shaders/Phong.h

@ -106,7 +106,7 @@ class MAGNUM_SHADERS_EXPORT Phong: public AbstractShaderProgram {
* *
* @see @ref flags() * @see @ref flags()
*/ */
typedef Containers::EnumSet<Flag, UnsignedByte> Flags; typedef Containers::EnumSet<Flag> Flags;
/** /**
* @brief Constructor * @brief Constructor

2
src/Magnum/Text/AbstractFont.h

@ -100,7 +100,7 @@ class MAGNUM_TEXT_EXPORT AbstractFont: public PluginManager::AbstractPlugin {
}; };
/** @brief Set of features supported by this importer */ /** @brief Set of features supported by this importer */
typedef Containers::EnumSet<Feature, UnsignedByte> Features; typedef Containers::EnumSet<Feature> Features;
/** @brief Default constructor */ /** @brief Default constructor */
explicit AbstractFont(); explicit AbstractFont();

2
src/Magnum/Text/AbstractFontConverter.h

@ -117,7 +117,7 @@ class MAGNUM_TEXT_EXPORT AbstractFontConverter: public PluginManager::AbstractPl
* *
* @see @ref features() * @see @ref features()
*/ */
typedef Containers::EnumSet<Feature, UnsignedByte> Features; typedef Containers::EnumSet<Feature> Features;
/** @brief Default constructor */ /** @brief Default constructor */
explicit AbstractFontConverter(); explicit AbstractFontConverter();

2
src/Magnum/Trade/AbstractImageConverter.h

@ -78,7 +78,7 @@ class MAGNUM_EXPORT AbstractImageConverter: public PluginManager::AbstractPlugin
* *
* @see @ref features() * @see @ref features()
*/ */
typedef Containers::EnumSet<Feature, UnsignedByte> Features; typedef Containers::EnumSet<Feature> Features;
/** @brief Default constructor */ /** @brief Default constructor */
explicit AbstractImageConverter(); explicit AbstractImageConverter();

2
src/Magnum/Trade/AbstractImporter.h

@ -89,7 +89,7 @@ class MAGNUM_EXPORT AbstractImporter: public PluginManager::AbstractPlugin {
}; };
/** @brief Set of features supported by this importer */ /** @brief Set of features supported by this importer */
typedef Containers::EnumSet<Feature, UnsignedByte> Features; typedef Containers::EnumSet<Feature> Features;
/** @brief Default constructor */ /** @brief Default constructor */
explicit AbstractImporter(); explicit AbstractImporter();

2
src/Magnum/Trade/PhongMaterialData.h

@ -62,7 +62,7 @@ class MAGNUM_EXPORT PhongMaterialData: public AbstractMaterialData {
* *
* @see @ref flags() * @see @ref flags()
*/ */
typedef Containers::EnumSet<Flag, UnsignedByte> Flags; typedef Containers::EnumSet<Flag> Flags;
/** /**
* @brief Constructor * @brief Constructor

Loading…
Cancel
Save