- minor changes for ASSERT macros
- some more "unification" of 32 and 64 bits in typedefs - use of 'char' instead of 'unsigned char', as I may hope that 'char' usually is set to 'unsigned' in most development environments git-svn-id: svn://ttmath.org/publicrep/ttmath/branches/chk@133 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -44,7 +44,7 @@ namespace ttmath
|
||||
typedef std::wostream tostrm_t;
|
||||
typedef std::wistream tistrm_t;
|
||||
#else
|
||||
typedef unsigned char tchar_t;
|
||||
typedef char tchar_t;
|
||||
typedef std::string tstr_t;
|
||||
typedef std::ostringstream tostrstrm_t;
|
||||
typedef std::ostream tostrm_t;
|
||||
@@ -58,7 +58,7 @@ namespace ttmath
|
||||
#endif
|
||||
#define TTMATH_TEXT(quote) __TEXT(quote)
|
||||
#else
|
||||
typedef unsigned char tchar_t;
|
||||
typedef char tchar_t;
|
||||
typedef std::string tstr_t;
|
||||
typedef std::ostringstream tostrstrm_t;
|
||||
typedef std::ostream tostrm_t;
|
||||
|
@@ -132,21 +132,16 @@ namespace ttmath
|
||||
*/
|
||||
typedef unsigned long long int ulint;
|
||||
|
||||
/*!
|
||||
how many bits there are in the uint type
|
||||
*/
|
||||
#define TTMATH_BITS_PER_UINT 32u
|
||||
|
||||
/*!
|
||||
the mask for the highest bit in the unsigned 32bit word (2^31)
|
||||
*/
|
||||
#define TTMATH_UINT_HIGHEST_BIT 2147483648u
|
||||
#define TTMATH_UINT_HIGHEST_BIT 0x80000000ul
|
||||
|
||||
/*!
|
||||
the max value of the unsigned 32bit word (2^32 - 1)
|
||||
(all bits equal one)
|
||||
*/
|
||||
#define TTMATH_UINT_MAX_VALUE 4294967295u
|
||||
#define TTMATH_UINT_MAX_VALUE 0xfffffffful
|
||||
|
||||
/*!
|
||||
the number of words (32bit words on 32bit platform)
|
||||
@@ -176,11 +171,6 @@ namespace ttmath
|
||||
*/
|
||||
//typedef unsigned long long int ulint;
|
||||
|
||||
/*!
|
||||
how many bits there are in the uint type
|
||||
*/
|
||||
#define TTMATH_BITS_PER_UINT 64ul
|
||||
|
||||
/*!
|
||||
the mask for the highest bit in the unsigned 64bit word (2^63)
|
||||
*/
|
||||
@@ -200,6 +190,8 @@ namespace ttmath
|
||||
#define TTMATH_BUILTIN_VARIABLES_SIZE 128ul
|
||||
|
||||
#endif
|
||||
|
||||
#define TTMATH_BITS_PER_UINT (sizeof(uint)*8)
|
||||
}
|
||||
|
||||
|
||||
@@ -412,10 +404,10 @@ namespace ttmath
|
||||
#if defined(__FILE__) && defined(__LINE__)
|
||||
|
||||
#define TTMATH_REFERENCE_ASSERT(expression) \
|
||||
if( &(expression) == this ) throw ttmath::ReferenceError(__FILE__, __LINE__);
|
||||
if( &(expression) == this ) throw ttmath::ReferenceError(TTMATH_TEXT(__FILE__), __LINE__);
|
||||
|
||||
#define TTMATH_ASSERT(expression) \
|
||||
if( !(expression) ) throw ttmath::RuntimeError(__FILE__, __LINE__);
|
||||
if( !(expression) ) throw ttmath::RuntimeError(TTMATH_TEXT(__FILE__), __LINE__);
|
||||
|
||||
#else
|
||||
|
||||
|
@@ -41,7 +41,6 @@
|
||||
|
||||
|
||||
#ifndef TTMATH_NOASM
|
||||
#pragma message("ASM code included")
|
||||
#ifdef TTMATH_PLATFORM64
|
||||
|
||||
/*!
|
||||
|
Reference in New Issue
Block a user