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
@@ -24,7 +24,7 @@ namespace AzFramework
LinuxXcbConnectionManagerBus::Handler::BusConnect();
}
~LinuxXcbConnectionManagerImpl()
~LinuxXcbConnectionManagerImpl() override
{
LinuxXcbConnectionManagerBus::Handler::BusDisconnect();
xcb_disconnect(m_xcbConnection);
@@ -78,7 +78,7 @@ namespace AzFramework
FD_ZERO(&set);
FD_SET(handle->GetHandle(), &set);
[[maybe_unused]] int numReady = select(handle->GetHandle() + 1, &set, NULL, NULL, NULL);
[[maybe_unused]] int numReady = select(handle->GetHandle() + 1, &set, nullptr, nullptr, nullptr);
// if numReady == -1 and errno == EINTR then the child process died unexpectedly and
// the handle was closed. Not something to assert about in regards to trying to read
@@ -277,7 +277,7 @@ namespace AzFramework
environmentVariables[i][0] = '\0';
azstrcat(environmentVariables[i], envVarString.size(), envVarString.c_str());
}
environmentVariables[numEnvironmentVars] = NULL;
environmentVariables[numEnvironmentVars] = nullptr;
}
pid_t child_pid = fork();
@@ -373,7 +373,7 @@ namespace AzFramework
}
bool isProcessDone = false;
time_t startTime = time(0);
time_t startTime = time(nullptr);
time_t currentTime = startTime;
AZ_Assert(currentTime != -1, "time(0) returned an invalid time");
while (((currentTime - startTime) < waitTimeInSeconds) && !isProcessDone)
@@ -385,7 +385,7 @@ namespace AzFramework
m_pWatcherData->m_childProcessIsDone = true;
break;
}
currentTime = time(0);
currentTime = time(nullptr);
}
//returns false if process is still running after time
return isProcessDone;