Warning fix on latest gcc
This commit is contained in:
parent
fcaa62d69f
commit
08a2b58510
1 changed files with 9 additions and 9 deletions
|
@ -28,6 +28,8 @@ namespace vwr {
|
||||||
template <typename V>
|
template <typename V>
|
||||||
struct VectorWrapperInfo;
|
struct VectorWrapperInfo;
|
||||||
|
|
||||||
|
typedef decltype(sizeof(int)) vwr_size_t;
|
||||||
|
|
||||||
template <typename V, size_type S=VectorWrapperInfo<V>::dimensions>
|
template <typename V, size_type S=VectorWrapperInfo<V>::dimensions>
|
||||||
class Vec;
|
class Vec;
|
||||||
|
|
||||||
|
@ -62,29 +64,27 @@ namespace vwr {
|
||||||
|
|
||||||
template <typename T, size_type I> struct get_offset_enum_from_index;
|
template <typename T, size_type I> struct get_offset_enum_from_index;
|
||||||
template <typename T> struct get_offset_enum_from_index<T, 0> {
|
template <typename T> struct get_offset_enum_from_index<T, 0> {
|
||||||
enum { value = VectorWrapperInfo<T>::offset_x };
|
static constexpr vwr_size_t value = VectorWrapperInfo<T>::offset_x;
|
||||||
};
|
};
|
||||||
template <typename T> struct get_offset_enum_from_index<T, 1> {
|
template <typename T> struct get_offset_enum_from_index<T, 1> {
|
||||||
enum { value = VectorWrapperInfo<T>::offset_y };
|
static constexpr vwr_size_t value = VectorWrapperInfo<T>::offset_y;
|
||||||
};
|
};
|
||||||
template <typename T> struct get_offset_enum_from_index<T, 2> {
|
template <typename T> struct get_offset_enum_from_index<T, 2> {
|
||||||
enum { value = VectorWrapperInfo<T>::offset_z };
|
static constexpr vwr_size_t value = VectorWrapperInfo<T>::offset_z;
|
||||||
};
|
};
|
||||||
template <typename T> struct get_offset_enum_from_index<T, 3> {
|
template <typename T> struct get_offset_enum_from_index<T, 3> {
|
||||||
enum { value = VectorWrapperInfo<T>::offset_w };
|
static constexpr vwr_size_t value = VectorWrapperInfo<T>::offset_w;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T, size_type S=VectorWrapperInfo<T>::dimensions> struct min_offset {
|
template <typename T, size_type S=VectorWrapperInfo<T>::dimensions> struct min_offset {
|
||||||
enum {
|
static constexpr vwr_size_t value = (
|
||||||
value = (
|
|
||||||
static_cast<int>(get_offset_enum_from_index<T, S-1>::value) < static_cast<int>(min_offset<T, S-1>::value) ?
|
static_cast<int>(get_offset_enum_from_index<T, S-1>::value) < static_cast<int>(min_offset<T, S-1>::value) ?
|
||||||
static_cast<int>(get_offset_enum_from_index<T, S-1>::value) :
|
static_cast<int>(get_offset_enum_from_index<T, S-1>::value) :
|
||||||
static_cast<int>(min_offset<T, S-1>::value)
|
static_cast<int>(min_offset<T, S-1>::value)
|
||||||
)
|
);
|
||||||
};
|
|
||||||
};
|
};
|
||||||
template <typename T> struct min_offset<T, 1> {
|
template <typename T> struct min_offset<T, 1> {
|
||||||
enum { value = get_offset_enum_from_index<T, 0>::value };
|
static constexpr vwr_size_t value = get_offset_enum_from_index<T, 0>::value;
|
||||||
};
|
};
|
||||||
} //namespace implem
|
} //namespace implem
|
||||||
} //namespace vwr
|
} //namespace vwr
|
||||||
|
|
Loading…
Reference in a new issue