Modernization + AZStd::function compare fix. (#3680)

* Modernization + small fix.

Modernize ( `bool`/`override`/other) code in AzCore, AzFramework, AzQtComponents, AzToolsFramework, etc.
Replaced a `bind` or two, use `using` in a few places as well.

Fix nullptr comparison of AZStd::function.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Apply review-based changes

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
This commit is contained in:
Artur K
2021-09-02 21:55:09 +02:00
committed by GitHub
parent b3c8b0f5f3
commit 567c0ae24d
150 changed files with 865 additions and 847 deletions
@@ -562,7 +562,7 @@ namespace AzFramework
void TargetManagementComponent::SetMyPersistentName(const char* name)
{
AZ_Assert(m_networkImpl->m_session == NULL, "We cannot change our neighborhood while connected!");
AZ_Assert(m_networkImpl->m_session == nullptr, "We cannot change our neighborhood while connected!");
m_settings->m_persistentName = name;
}
@@ -585,7 +585,7 @@ namespace AzFramework
void TargetManagementComponent::SetNeighborhood(const char* name)
{
AZ_Assert(m_networkImpl->m_session == NULL, "We cannot change our neighborhood while connected!");
AZ_Assert(m_networkImpl->m_session == nullptr, "We cannot change our neighborhood while connected!");
m_settings->m_neighborhoodName = name;
}
@@ -714,7 +714,7 @@ namespace AzFramework
{
GridMate::GridMember* member = m_networkImpl->m_session->GetMemberByIndex(i);
GridMate::MemberIDCompact memberId = member->GetId().Compact();
const TargetInfo* target = NULL;
const TargetInfo* target = nullptr;
AZ::u32 targetId = 0;
for (TargetContainer::const_iterator targetIt = m_availableTargets.begin(); targetIt != m_availableTargets.end(); ++targetIt)
{
@@ -742,7 +742,7 @@ namespace AzFramework
AZ::IO::MemoryStream msgBuffer(m_tmpInboundBuffer.data(), result.m_numBytes, result.m_numBytes);
TmMsg* msg = nullptr;
AZ::ObjectStream::ClassReadyCB readyCB(AZStd::bind(&TargetManagementComponent::OnMsgParsed, this, &msg, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3));
AZ::ObjectStream::LoadBlocking(&msgBuffer, *m_serializeContext, readyCB, AZ::ObjectStream::FilterDescriptor(0, AZ::ObjectStream::FILTERFLAG_IGNORE_UNKNOWN_CLASSES));
AZ::ObjectStream::LoadBlocking(&msgBuffer, *m_serializeContext, readyCB, AZ::ObjectStream::FilterDescriptor(nullptr, AZ::ObjectStream::FILTERFLAG_IGNORE_UNKNOWN_CLASSES));
if (msg)
{
if (msg->GetCustomBlobSize() > 0)