Skip to content

Commit

Permalink
Limited extended integer type redifinition (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
Groovounet committed Sep 1, 2014
1 parent 90acd72 commit 4a701c6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
17 changes: 16 additions & 1 deletion glm/fwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,13 @@ namespace glm
/// @see gtc_type_precision
typedef detail::int64 int64;


#if GLM_HAS_EXTENDED_INTEGER_TYPE
using std::int8_t;
using std::int16_t;
using std::int32_t;
using std::int64_t;
#else
/// 8 bit signed integer type.
/// @see gtc_type_precision
typedef detail::int8 int8_t;
Expand All @@ -302,6 +309,7 @@ namespace glm
/// 64 bit signed integer type.
/// @see gtc_type_precision
typedef detail::int64 int64_t;
#endif

/// 8 bit signed integer type.
/// @see gtc_type_precision
Expand Down Expand Up @@ -889,6 +897,12 @@ namespace glm
/// @see gtc_type_precision
typedef detail::uint64 uint64;

#if GLM_HAS_EXTENDED_INTEGER_TYPE
using std::uint8_t;
using std::uint16_t;
using std::uint32_t;
using std::uint64_t;
#else
/// 8 bit unsigned integer type.
/// @see gtc_type_precision
typedef detail::uint8 uint8_t;
Expand All @@ -904,7 +918,8 @@ namespace glm
/// 64 bit unsigned integer type.
/// @see gtc_type_precision
typedef detail::uint64 uint64_t;

#endif

/// 8 bit unsigned integer type.
/// @see gtc_type_precision
typedef detail::uint8 u8;
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ GLM 0.9.6.0: 2014-XX-XX
- Use pragma once
- Fixed Visual Studio 14 compiler warnings
- Added *vec1 support to *vec2 types
- Limited extended integer type redifinition (#233)

================================================================================
GLM 0.9.5.5: 2014-XX-XX
Expand Down

3 comments on commit 4a701c6

@richardeakin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Cristophe, thanks for this. I was wondering (but really don't know), does the same treatment need to be done in type_precision.hpp too?

@Groovounet
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

Yes there is more to do, I haven't close the issue for that reason.
I am also considering rolling up some changes for std::sqrt, etc.

Thanks,
Christophe

@richardeakin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, cool! I'll keep an eye out for those.. cheers.

Please # to comment.