Assert: Uppercase assertion macros

Macros should be all upper-cased. This is also kind of a wart that's
been sticking out for quite a while now (we avoid prefixing
underscores).
This commit is contained in:
Lioncash
2018-03-14 20:34:35 -04:00
parent 19d97f3fd9
commit 50a476c371
135 changed files with 719 additions and 741 deletions

View File

@ -318,7 +318,7 @@ void ProcessTriangle(OutputVertexData* v0, OutputVertexData* v1, OutputVertexDat
for (int i = 0; i + 3 <= numIndices; i += 3)
{
_assert_(i < NUM_INDICES);
ASSERT(i < NUM_INDICES);
if (indices[i] != SKIP_FLAG)
{
PerspectiveDivide(Vertices[indices[i]]);

View File

@ -57,7 +57,7 @@ void SWTexture::CopyRectangleFromTexture(const AbstractTexture* src,
u32 src_level, const MathUtil::Rectangle<int>& dst_rect,
u32 dst_layer, u32 dst_level)
{
_assert_(src_level == 0 && src_layer == 0 && dst_layer == 0 && dst_level == 0);
ASSERT(src_level == 0 && src_layer == 0 && dst_layer == 0 && dst_level == 0);
CopyTextureData(src->GetConfig(), static_cast<const SWTexture*>(src)->m_data.data(),
src_rect.left, src_rect.top, src_rect.GetWidth(), src_rect.GetHeight(), m_config,
m_data.data(), dst_rect.left, dst_rect.top);
@ -121,7 +121,7 @@ void SWStagingTexture::CopyFromTexture(const AbstractTexture* src,
const MathUtil::Rectangle<int>& src_rect, u32 src_layer,
u32 src_level, const MathUtil::Rectangle<int>& dst_rect)
{
_assert_(src_level == 0 && src_layer == 0);
ASSERT(src_level == 0 && src_layer == 0);
CopyTextureData(src->GetConfig(), static_cast<const SWTexture*>(src)->GetData(), src_rect.left,
src_rect.top, src_rect.GetWidth(), src_rect.GetHeight(), m_config, m_data.data(),
dst_rect.left, dst_rect.top);
@ -132,7 +132,7 @@ void SWStagingTexture::CopyToTexture(const MathUtil::Rectangle<int>& src_rect, A
const MathUtil::Rectangle<int>& dst_rect, u32 dst_layer,
u32 dst_level)
{
_assert_(dst_level == 0 && dst_layer == 0);
ASSERT(dst_level == 0 && dst_layer == 0);
CopyTextureData(m_config, m_data.data(), src_rect.left, src_rect.top, src_rect.GetWidth(),
src_rect.GetHeight(), dst->GetConfig(), static_cast<SWTexture*>(dst)->GetData(),
dst_rect.left, dst_rect.top);

View File

@ -196,8 +196,8 @@ static void ReadVertexAttribute(T* dst, DataReader src, const AttributeFormat& f
break;
}
_assert_msg_(VIDEO, !format.integer || format.type != VAR_FLOAT,
"only non-float values are allowed to be streamed as integer");
ASSERT_MSG(VIDEO, !format.integer || format.type != VAR_FLOAT,
"only non-float values are allowed to be streamed as integer");
}
for (; i < components; i++)
{

View File

@ -564,8 +564,8 @@ void Tev::Indirect(unsigned int stageNum, s32 s, s32 t)
void Tev::Draw()
{
_assert_(Position[0] >= 0 && Position[0] < EFB_WIDTH);
_assert_(Position[1] >= 0 && Position[1] < EFB_HEIGHT);
ASSERT(Position[0] >= 0 && Position[0] < EFB_WIDTH);
ASSERT(Position[1] >= 0 && Position[1] < EFB_HEIGHT);
INCSTAT(stats.thisFrame.tevPixelsIn);

View File

@ -129,7 +129,7 @@ static void TransformTexCoordRegular(const TexMtxInfo& texinfo, int coordNum, bo
src = srcVertex->normal[2];
break;
default:
_assert_(texinfo.sourcerow >= XF_SRCTEX0_INROW && texinfo.sourcerow <= XF_SRCTEX7_INROW);
ASSERT(texinfo.sourcerow >= XF_SRCTEX0_INROW && texinfo.sourcerow <= XF_SRCTEX7_INROW);
src.x = srcVertex->texCoords[texinfo.sourcerow - XF_SRCTEX0_INROW][0];
src.y = srcVertex->texCoords[texinfo.sourcerow - XF_SRCTEX0_INROW][1];
src.z = 1.0f;
@ -148,7 +148,7 @@ static void TransformTexCoordRegular(const TexMtxInfo& texinfo, int coordNum, bo
}
else // texinfo.projection == XF_TEXPROJ_STQ
{
_assert_(!specialCase);
ASSERT(!specialCase);
if (texinfo.inputform == XF_TEXINPUT_AB11)
MultiplyVec2Mat34(src, mat, *dst);
@ -289,7 +289,7 @@ static void LightColor(const Vec3& pos, const Vec3& normal, u8 lightNum, const L
AddScaledIntegerColor(light->color, attn * difAttn, lightCol);
break;
default:
_assert_(0);
ASSERT(0);
}
}
@ -315,7 +315,7 @@ static void LightAlpha(const Vec3& pos, const Vec3& normal, u8 lightNum, const L
lightCol += light->color[0] * attn * difAttn;
break;
default:
_assert_(0);
ASSERT(0);
}
}
@ -432,15 +432,15 @@ void TransformTexCoord(const InputVertexData* src, OutputVertexData* dst, bool s
}
break;
case XF_TEXGEN_COLOR_STRGBC0:
_assert_(texinfo.sourcerow == XF_SRCCOLORS_INROW);
_assert_(texinfo.inputform == XF_TEXINPUT_AB11);
ASSERT(texinfo.sourcerow == XF_SRCCOLORS_INROW);
ASSERT(texinfo.inputform == XF_TEXINPUT_AB11);
dst->texCoords[coordNum].x = (float)dst->color[0][0] / 255.0f;
dst->texCoords[coordNum].y = (float)dst->color[0][1] / 255.0f;
dst->texCoords[coordNum].z = 1.0f;
break;
case XF_TEXGEN_COLOR_STRGBC1:
_assert_(texinfo.sourcerow == XF_SRCCOLORS_INROW);
_assert_(texinfo.inputform == XF_TEXINPUT_AB11);
ASSERT(texinfo.sourcerow == XF_SRCCOLORS_INROW);
ASSERT(texinfo.inputform == XF_TEXINPUT_AB11);
dst->texCoords[coordNum].x = (float)dst->color[1][0] / 255.0f;
dst->texCoords[coordNum].y = (float)dst->color[1][1] / 255.0f;
dst->texCoords[coordNum].z = 1.0f;