SH-3406 WIP convert fast timers to lltrace system
improved LLUnit compile time errors removed cassert in favor of llstatic_assertmaster
parent
60800dacdd
commit
2facd63745
|
|
@ -41,7 +41,6 @@
|
|||
#include <algorithm>
|
||||
// std headers
|
||||
#include <typeinfo>
|
||||
#include <cassert>
|
||||
#include <cmath>
|
||||
#include <cctype>
|
||||
// external library headers
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ documentation and/or software.
|
|||
|
||||
#include "llmd5.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <iostream> // cerr
|
||||
|
||||
// how many bytes to grab at a time when checking files
|
||||
|
|
|
|||
|
|
@ -210,8 +210,7 @@ inline LLSkipMap<INDEX_TYPE, DATA_TYPE, BINARY_DEPTH>::LLSkipMap()
|
|||
: mInsertFirst(NULL),
|
||||
mEquals(defaultEquals)
|
||||
{
|
||||
// Skipmaps must have binary depth of at least 2
|
||||
cassert(BINARY_DEPTH >= 2);
|
||||
llstatic_assert(BINARY_DEPTH >= 2, "Skipmaps must have binary depth of at least 2");
|
||||
|
||||
S32 i;
|
||||
for (i = 0; i < BINARY_DEPTH; i++)
|
||||
|
|
@ -229,8 +228,7 @@ inline LLSkipMap<INDEX_TYPE, DATA_TYPE, BINARY_DEPTH>::LLSkipMap(BOOL (*insert_f
|
|||
: mInsertFirst(insert_first),
|
||||
mEquals(equals)
|
||||
{
|
||||
// Skipmaps must have binary depth of at least 2
|
||||
cassert(BINARY_DEPTH >= 2);
|
||||
llstatic_assert(BINARY_DEPTH >= 2, "Skipmaps must have binary depth of at least 2");
|
||||
|
||||
mLevel = 1;
|
||||
S32 i;
|
||||
|
|
|
|||
|
|
@ -271,10 +271,11 @@ LLUnit<UNIT_TYPE, STORAGE_TYPE> operator * (LLUnit<UNIT_TYPE, STORAGE_TYPE> firs
|
|||
}
|
||||
|
||||
template<typename UNIT_TYPE1, typename STORAGE_TYPE1, typename UNIT_TYPE2, typename STORAGE_TYPE2>
|
||||
void operator * (LLUnit<UNIT_TYPE1, STORAGE_TYPE1>, LLUnit<UNIT_TYPE2, STORAGE_TYPE2>)
|
||||
LLUnit<UNIT_TYPE1, STORAGE_TYPE1> operator * (LLUnit<UNIT_TYPE1, STORAGE_TYPE1>, LLUnit<UNIT_TYPE2, STORAGE_TYPE2>)
|
||||
{
|
||||
// spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template
|
||||
llstatic_assert(sizeof(STORAGE_TYPE1) == 0, "Multiplication of unit types results in new unit type - not supported.");
|
||||
return LLUnit<UNIT_TYPE1, STORAGE_TYPE1>();
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -293,10 +294,10 @@ LLUnit<UNIT_TYPE, STORAGE_TYPE> operator / (LLUnit<UNIT_TYPE, STORAGE_TYPE> firs
|
|||
}
|
||||
|
||||
template<typename UNIT_TYPE1, typename STORAGE_TYPE1, typename UNIT_TYPE2, typename STORAGE_TYPE2>
|
||||
void operator / (LLUnit<UNIT_TYPE1, STORAGE_TYPE1>, LLUnit<UNIT_TYPE2, STORAGE_TYPE2>)
|
||||
STORAGE_TYPE1 operator / (LLUnit<UNIT_TYPE1, STORAGE_TYPE1> first, LLUnit<UNIT_TYPE2, STORAGE_TYPE2> second)
|
||||
{
|
||||
// spurious use of dependent type to stop gcc from triggering the static assertion before instantiating the template
|
||||
llstatic_assert(sizeof(STORAGE_TYPE1) == 0, "Multiplication of unit types results in new unit type - not supported.");
|
||||
return STORAGE_TYPE1(first.value() / second.value());
|
||||
}
|
||||
|
||||
#define COMPARISON_OPERATORS(op) \
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@
|
|||
#define LLVIEW_CPP
|
||||
#include "llview.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <sstream>
|
||||
#include <boost/tokenizer.hpp>
|
||||
#include <boost/foreach.hpp>
|
||||
|
|
|
|||
Loading…
Reference in New Issue