Fix clang 13 compilation problems (#5791)
* Fix clang 13 compilation problems Re-instated ShowPlayedSequencesDebug logic by introducing no-op lambda which replaces missing `Draw2dLabel` functionality ( added TODO marker there ) Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * apply review suggestions Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com> * Fix type in assert message Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
This commit is contained in:
@@ -726,24 +726,27 @@ void UiAnimationSystem::StillUpdate()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void UiAnimationSystem::ShowPlayedSequencesDebug()
|
||||
{
|
||||
//f32 green[4] = {0, 1, 0, 1};
|
||||
//f32 purple[4] = {1, 0, 1, 1};
|
||||
//f32 white[4] = {1, 1, 1, 1};
|
||||
constexpr f32 green[4] = {0, 1, 0, 1};
|
||||
constexpr f32 purple[4] = {1, 0, 1, 1};
|
||||
constexpr f32 white[4] = {1, 1, 1, 1};
|
||||
float y = 10.0f;
|
||||
AZStd::vector<AZStd::string> names;
|
||||
|
||||
//TODO: needs an implementation
|
||||
auto Draw2dLabel = [](float /*x*/,float /*y*/,float /*depth*/,const f32* /*color*/,bool /*center*/, const char* /*fmt*/, ...) {};
|
||||
|
||||
for (PlayingSequences::iterator it = m_playingSequences.begin(); it != m_playingSequences.end(); ++it)
|
||||
{
|
||||
PlayingUIAnimSequence& playingSequence = *it;
|
||||
|
||||
if (playingSequence.sequence == NULL)
|
||||
if (playingSequence.sequence == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
AZ_Assert(false,"gEnv->pRenderer is always null so it can't be used here");
|
||||
//const char* fullname = playingSequence.sequence->GetName();
|
||||
//gEnv->pRenderer->Draw2dLabel(1.0f, y, 1.3f, green, false, "Sequence %s : %f (x %f)", fullname, playingSequence.currentTime, playingSequence.currentSpeed);
|
||||
const char* fullname = playingSequence.sequence->GetName();
|
||||
Draw2dLabel(1.0f, y, 1.3f, green, false, "Sequence %s : %f (x %f)", fullname, playingSequence.currentTime, playingSequence.currentSpeed);
|
||||
|
||||
y += 16.0f;
|
||||
|
||||
@@ -762,7 +765,7 @@ void UiAnimationSystem::ShowPlayedSequencesDebug()
|
||||
names.push_back(name);
|
||||
}
|
||||
|
||||
//gEnv->pRenderer->Draw2dLabel((21.0f + 100.0f * i), ((i % 2) ? (y + 8.0f) : y), 1.0f, alreadyThere ? white : purple, false, "%s", name.c_str());
|
||||
Draw2dLabel((21.0f + 100.0f * i), ((i % 2) ? (y + 8.0f) : y), 1.0f, alreadyThere ? white : purple, false, "%s", name.c_str());
|
||||
}
|
||||
|
||||
y += 32.0f;
|
||||
|
||||
Reference in New Issue
Block a user