some unused fixes

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-08-19 18:26:43 -07:00
parent 63cd3db956
commit cf6c7c4d8d
31 changed files with 28 additions and 82 deletions
@@ -1294,7 +1294,7 @@ namespace AZ
void Visit(AZStd::string_view path, AZStd::string_view, AZ::SettingsRegistryInterface::Type, AZStd::string_view value) override
{
// Remove last path segment and check if the key corresponds to the Modules array
AZStd::optional<AZStd::string_view> moduleIndex = AZ::StringFunc::TokenizeLast(path, "/");
AZ::StringFunc::TokenizeLast(path, "/");
if (path.ends_with("/Modules"))
{
// Remove the "Modules" path segment to be at the GemName key
@@ -89,12 +89,9 @@ namespace AZ
result.Combine(componentLoadResult);
}
{
JSR::ResultCode runtimeActiveLoadResult =
ContinueLoadingFromJsonObjectField(&entityInstance->m_isRuntimeActiveByDefault,
azrtti_typeid<decltype(entityInstance->m_isRuntimeActiveByDefault)>(),
inputValue, "IsRuntimeActive", context);
}
ContinueLoadingFromJsonObjectField(&entityInstance->m_isRuntimeActiveByDefault,
azrtti_typeid<decltype(entityInstance->m_isRuntimeActiveByDefault)>(),
inputValue, "IsRuntimeActive", context);
return context.Report(
result,
@@ -165,7 +165,7 @@ namespace AZ
AZStd::fixed_vector<TypeId, 64> knownBaseClasses = { typeToExamine }; // avoid allocating heap here if possible. 64 types are 64*sizeof(Uuid) which is only 1k.
bool foundBaseClass = false;
auto enumerateBaseVisitor = [&foundBaseClass, &baseClassVisitor, &knownBaseClasses](const AZ::SerializeContext::ClassData* classData, const TypeId& examineTypeId)
auto enumerateBaseVisitor = [&baseClassVisitor, &knownBaseClasses](const AZ::SerializeContext::ClassData* classData, const TypeId& examineTypeId)
{
if (!classData)
{
@@ -1320,7 +1320,7 @@ namespace AZ
(void)classElement;
void* reserveElement{};
using DummyArray = bool[];
DummyArray{ true, (ReserveElementTuple<Indices>(tupleRef, classElement, reserveElement))... };
[[maybe_unused]] DummyArray dummy = { true, (ReserveElementTuple<Indices>(tupleRef, classElement, reserveElement))... };
return reserveElement;
}
@@ -135,7 +135,6 @@ namespace AZ
AZStd::list<SerializeContext::ClassElement> m_dynamicClassElements; ///< Storage for class elements that represent dynamic serializable fields.
};
static bool ConvertLegacyBoolToEnum(AZ::SerializeContext& context, AZStd::any& patchAny, const DataNode& sourceNode);
static void ReportDataPatchMismatch(SerializeContext* context, const SerializeContext::ClassElement* classElement, const TypeId& patchDataTypeId);
//=========================================================================
@@ -483,9 +483,9 @@ namespace AZ
}
private:
static void ObjectStreamWriter(SerializeContext::EnumerateInstanceCallContext& callContext, const void* variantPtr,
const SerializeContext::ClassData& variantClassData, const SerializeContext::ClassElement* variantClassElement)
[[maybe_unused]] const SerializeContext::ClassData& variantClassData, const SerializeContext::ClassElement* variantClassElement)
{
auto alternativeVisitor = [&callContext, &variantClassData, variantClassElement](auto&& elementAlt)
auto alternativeVisitor = [&callContext, variantClassElement](auto&& elementAlt)
{
using AltType = AZStd::remove_cvref_t<decltype(elementAlt)>;
const SerializeContext& context = *callContext.m_context;
@@ -366,7 +366,7 @@ namespace AzFramework
AZStd::set<AZStd::string> tags;
AZStd::string resolvedFilePath = ResolveFilePath(filePath);
auto found = AZStd::find_if(m_fileTagsMap.begin(), m_fileTagsMap.end(), [filePath, resolvedFilePath, this](auto& entry) -> bool
auto found = AZStd::find_if(m_fileTagsMap.begin(), m_fileTagsMap.end(), [filePath, resolvedFilePath](auto& entry) -> bool
{
return resolvedFilePath == ResolveFilePath(entry.first);
});
@@ -54,9 +54,6 @@ namespace AzFramework
if (auto instance_it = m_entityVisibilityBoundsUnionInstanceMapping.find(entity);
instance_it == m_entityVisibilityBoundsUnionInstanceMapping.end())
{
AZ::TransformInterface* transformInterface = entity->GetTransform();
const AZ::Vector3 entityPosition = transformInterface->GetWorldTranslation();
EntityVisibilityBoundsUnionInstance instance;
instance.m_localEntityBoundsUnion = CalculateEntityLocalBoundsUnion(entity);
instance.m_visibilityEntry.m_typeFlags = VisibilityEntry::TYPE_Entity;
@@ -202,8 +202,6 @@ namespace AzFramework
bool ProcessLauncher::LaunchProcess(const ProcessLaunchInfo& processLaunchInfo, ProcessData& processData)
{
bool result = false;
// note that the convention here is that it uses windows-shell style escaping of combined args with spaces in it
// (so surrounding with quotes like param="hello world")
// this is so that the callers (which could be numerous) do not have to worry about this and sprinkle ifdefs
@@ -64,7 +64,7 @@ namespace AzNetworking
{
--m_listenPortCount;
auto visitor = [this, &tcpNetworkInterface](ListenPort& listenPort)
auto visitor = [&tcpNetworkInterface](ListenPort& listenPort)
{
if (listenPort.m_tcpNetworkInterface == &tcpNetworkInterface)
{
@@ -120,7 +120,7 @@ namespace AzNetworking
auto readCallback = [this, newConnection, connectionLength](SocketFd socketFd)
{
auto visitor = [this, newConnection, connectionLength, socketFd](ListenPort& listenPort)
auto visitor = [this, newConnection, socketFd](ListenPort& listenPort)
{
if (listenPort.m_listenSocket.GetSocketFd() == socketFd)
{
@@ -132,7 +132,7 @@ namespace AzNetworking
auto writeCallback = [](SocketFd) {};
m_tcpSocketManager.ProcessEvents(updateRateMs, readCallback, writeCallback);
auto cleanupUnused = [this](AZ::ThreadSafeDeque<ListenPort>::DequeType& deque)
auto cleanupUnused = [](AZ::ThreadSafeDeque<ListenPort>::DequeType& deque)
{
AZStd::remove_if(deque.begin(), deque.end(), [](ListenPort& listenPort) { return listenPort.m_tcpNetworkInterface == nullptr; });
};
@@ -86,7 +86,7 @@ namespace AzNetworking
#if AZ_TRAIT_USE_OPENSSL
uint8_t encrpytedSendBuffer[MaxUdpTransmissionUnit];
// Write out the packet we were requested to send
const int32_t sentBytesRaw = SSL_write(dtlsEndpoint.m_sslSocket, data, size);
SSL_write(dtlsEndpoint.m_sslSocket, data, size);
const int32_t sentBytesEnc = BIO_read(dtlsEndpoint.m_writeBio, encrpytedSendBuffer, sizeof(encrpytedSendBuffer));
// Track encryption metrics
@@ -160,7 +160,6 @@ namespace AzNetworking
const AZ::TimeMs jitterMs = aznumeric_cast<AZ::TimeMs>(m_random.GetRandom()) % (connectionQuality.m_varianceMs > AZ::TimeMs{ 0 }
? connectionQuality.m_varianceMs
: AZ::TimeMs{ 1 });
const AZ::TimeMs currTimeMs = AZ::GetElapsedTimeMs();
const AZ::TimeMs deferTimeMs = (connectionQuality.m_latencyMs) + jitterMs;
DeferredData deferred = DeferredData(address, data, size, encrypt, dtlsEndpoint);
@@ -14,14 +14,14 @@
#include <AzNetworking/Utilities/Endian_Platform.h>
#if AZ_TRAIT_NEEDS_HTONLL
static const uint64_t htonll(uint64_t value)
const uint64_t htonll(uint64_t value)
{
const uint32_t hiValue = htonl(static_cast<uint32_t>(value >> 32));
const uint32_t loValue = htonl(static_cast<uint32_t>(value & 0x00000000FFFFFFFF));
return static_cast<uint64_t>(hiValue) << 32 | static_cast<uint64_t>(loValue);
}
static const uint64_t ntohll(uint64_t value)
const uint64_t ntohll(uint64_t value)
{
return htonll(value);
}
-1
View File
@@ -121,7 +121,6 @@ namespace AZ
char** SplitCommandLine(int& size, char* const cmdLine)
{
std::vector<char*> tokens;
char* next_token = nullptr;
char* tok = azstrtok(cmdLine, 0, " ", &next_token);
while (tok != NULL)
{