Mercurial > mm7
diff mm7_data.h @ 1721:1c072d19e397
Слияние
author | Ritor1 |
---|---|
date | Wed, 25 Sep 2013 09:03:56 +0600 |
parents | 5f2583a4fa7d f8414042db1f |
children | f44b6e02e81c |
line wrap: on
line diff
--- a/mm7_data.h Wed Sep 25 08:59:01 2013 +0600 +++ b/mm7_data.h Wed Sep 25 09:03:56 2013 +0600 @@ -4,6 +4,7 @@ #include "OSAPI.h" #include <array> #include <assert.h> +#include "NZIArray.h" typedef char _UNKNOWN; typedef unsigned int uint; @@ -283,44 +284,6 @@ return uint64(x) > uint64(x+y); } -template<class _Ty, - size_t _Size> -class NZIArray : std::array<_Ty, _Size> -{ -public: - reference ZerothIndex() - { - return std::array<_Ty, _Size>::operator [](0); - } - - reference operator[](size_type _Pos) - { // subscript nonmutable sequence -#if _ITERATOR_DEBUG_LEVEL == 2 - assert(_Pos != 0 && "not allowed to access zeroth element"); - -#elif _ITERATOR_DEBUG_LEVEL == 1 - _SCL_SECURE_VALIDATE_RANGE(_Pos != 0); -#endif /* _ITERATOR_DEBUG_LEVEL */ - - __analysis_assume(_Pos != 0); - - return std::array<_Ty, _Size>::operator [](_Pos); - } - - const_reference operator[](size_type _Pos) const - { // subscript nonmutable sequence -#if _ITERATOR_DEBUG_LEVEL == 2 - assert(_Pos != 0 && "not allowed to access zeroth element"); - -#elif _ITERATOR_DEBUG_LEVEL == 1 - _SCL_SECURE_VALIDATE_RANGE(_Pos != 0); -#endif /* _ITERATOR_DEBUG_LEVEL */ - - __analysis_assume(_Pos != 0); - - return std::array<_Ty, _Size>::operator [](_Pos); - } -}; //------------------------------------------------------------------------- // Data declarations