Commit 24236447 authored by TheOnlyJoey's avatar TheOnlyJoey
Browse files

Merge pull request #5 from hymerman/tidying

General tidy-up
parents c546989f ed6e1ba6
...@@ -99,6 +99,26 @@ restrictions: ...@@ -99,6 +99,26 @@ restrictions:
# define OIS_ARCH_32 # define OIS_ARCH_32
#endif #endif
//-------------- Various helper preprocessor definitions ---------------------//
#ifdef OIS_MSVC_COMPILER
# define OIS_INLINE_PRAGMA(x) __pragma(x) // x is intentionally not wrapped; __pragma rejects expressions beginning with '('.
#else
# define OIS_INLINE_PRAGMA(x)
#endif
#define OIS_MACRO_BEGIN do {
#define OIS_MACRO_END \
} OIS_INLINE_PRAGMA(warning(push)) OIS_INLINE_PRAGMA(warning(disable:4127)) while (0) OIS_INLINE_PRAGMA(warning(pop))
// This creative trickery taken from this StackOverflow answer:
// http://stackoverflow.com/questions/4030959/will-a-variablename-c-statement-be-a-no-op-at-all-times/4030983#4030983
#define OIS_UNUSED(x)\
OIS_MACRO_BEGIN\
((void)(true ? 0 : ((x), void(), 0)));\
OIS_MACRO_END
//-------------- Common Classes, Enums, and Typdef's -------------------------// //-------------- Common Classes, Enums, and Typdef's -------------------------//
#define OIS_VERSION_MAJOR 1 #define OIS_VERSION_MAJOR 1
#define OIS_VERSION_MINOR 4 #define OIS_VERSION_MINOR 4
...@@ -167,7 +187,7 @@ namespace OIS ...@@ -167,7 +187,7 @@ namespace OIS
{ {
public: public:
Component() : cType(OIS_Unknown) {}; Component() : cType(OIS_Unknown) {};
Component(ComponentType type) : cType(type) {}; explicit Component(ComponentType type) : cType(type) {};
//! Indicates what type of coponent this is //! Indicates what type of coponent this is
ComponentType cType; ComponentType cType;
}; };
...@@ -177,7 +197,7 @@ namespace OIS ...@@ -177,7 +197,7 @@ namespace OIS
{ {
public: public:
Button() : Component(OIS_Button), pushed(false) {} Button() : Component(OIS_Button), pushed(false) {}
Button(bool bPushed) : Component(OIS_Button), pushed(bPushed) {} explicit Button(bool bPushed) : Component(OIS_Button), pushed(bPushed) {}
//! true if pushed, false otherwise //! true if pushed, false otherwise
bool pushed; bool pushed;
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment