some fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -97,14 +97,14 @@ static const char* GetModulePath()
|
||||
return getenv(gEnvName);
|
||||
}
|
||||
|
||||
static void SetModulePath(const char* pModulePath)
|
||||
void SetModulePath(const char* pModulePath)
|
||||
{
|
||||
setenv(gEnvName, pModulePath ? pModulePath : "", true);
|
||||
}
|
||||
|
||||
// bInModulePath is only ever set to false in RC, because rc needs to load dlls from a $PATH that
|
||||
// it has modified to include ..
|
||||
static HMODULE CryLoadLibrary(const char* libName, bool bLazy = false, bool bInModulePath = true)
|
||||
HMODULE CryLoadLibrary(const char* libName, bool bLazy = false, bool bInModulePath = true)
|
||||
{
|
||||
const char* libPath = nullptr;
|
||||
char pathBuffer[MAX_PATH] = {0};
|
||||
@@ -161,7 +161,7 @@ static HMODULE CryLoadLibrary(const char* libName, bool bLazy = false, bool bInM
|
||||
return module;
|
||||
}
|
||||
|
||||
static bool CryFreeLibrary(void* lib)
|
||||
bool CryFreeLibrary(void* lib)
|
||||
{
|
||||
if (lib)
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ struct SFileVersion
|
||||
t[len] = 0;
|
||||
|
||||
char* p;
|
||||
char* next = nullptr;
|
||||
[[maybe_unused]] char* next = nullptr;
|
||||
[[maybe_unused]] size_t strmax = sizeof(t);
|
||||
p = azstrtok(t, &strmax, ".", &next);
|
||||
if (!p)
|
||||
|
||||
@@ -1520,7 +1520,6 @@ public:
|
||||
|
||||
const int oldVertexCount = GetVertexCount();
|
||||
const int oldFaceCount = GetFaceCount();
|
||||
const int nOldCoorCount = GetTexCoordCount();
|
||||
|
||||
if (GetTexCoordCount() != 0 && GetTexCoordCount() != oldVertexCount)
|
||||
{
|
||||
|
||||
@@ -411,7 +411,6 @@ typename VectorMap<K, V, T, A>::iterator VectorMap<K, V, T, A>::lower_bound(cons
|
||||
{
|
||||
int count = static_cast<int>(m_entries.size());
|
||||
iterator first = m_entries.begin();
|
||||
iterator last = m_entries.end();
|
||||
for (; 0 < count; )
|
||||
{ // divide and conquer, find half that contains answer
|
||||
int count2 = count / 2;
|
||||
@@ -434,7 +433,6 @@ typename VectorMap<K, V, T, A>::const_iterator VectorMap<K, V, T, A>::lower_boun
|
||||
{
|
||||
int count = static_cast<int>(m_entries.size());
|
||||
const_iterator first = m_entries.begin();
|
||||
const_iterator last = m_entries.end();
|
||||
for (; 0 < count; )
|
||||
{ // divide and conquer, find half that contains answer
|
||||
int count2 = count / 2;
|
||||
|
||||
@@ -1305,13 +1305,8 @@ const bool GetFilenameNoCase
|
||||
char* slash;
|
||||
const char* dirname;
|
||||
char* name;
|
||||
FS_ERRNO_TYPE fsErr = 0;
|
||||
FS_DIRENT_TYPE dirent;
|
||||
uint64_t direntSize = 0;
|
||||
FS_DIR_TYPE fd = FS_DIR_NULL;
|
||||
|
||||
if (
|
||||
(pAdjustedFilename) == (char*)-1)
|
||||
if ((pAdjustedFilename) == (char*)-1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1343,9 +1338,6 @@ const bool GetFilenameNoCase
|
||||
#endif
|
||||
|
||||
// Scan for the file.
|
||||
bool found = false;
|
||||
bool skipScan = false;
|
||||
|
||||
if (slash)
|
||||
{
|
||||
*slash = '/';
|
||||
|
||||
@@ -1926,11 +1926,9 @@ AZStd::string CLocalizedStringsManager::SLocalizedStringEntry::GetTranslatedText
|
||||
#endif //LOG_DECOMP_TIMES
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
size_t len =
|
||||
#endif
|
||||
strnlen((const char*)decompressionBuffer, COMPRESSION_FIXED_BUFFER_LENGTH);
|
||||
size_t len = strnlen((const char*)decompressionBuffer, COMPRESSION_FIXED_BUFFER_LENGTH);
|
||||
assert(len < COMPRESSION_FIXED_BUFFER_LENGTH && "Buffer not null-terminated");
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(LOG_DECOMP_TIMES)
|
||||
nAllocTicks = CryGetTicks();
|
||||
|
||||
@@ -444,8 +444,6 @@ void CLog::LogV(const ELogType type, [[maybe_unused]]int flags, const char* szFo
|
||||
return;
|
||||
}
|
||||
|
||||
LogStringType tempString;
|
||||
|
||||
char szBuffer[MAX_WARNING_LENGTH + 32];
|
||||
char* szString = szBuffer;
|
||||
char* szAfterColour = szString;
|
||||
@@ -1297,7 +1295,7 @@ void CLog::CheckAndPruneBackupLogs() const
|
||||
AZStd::list<fileInfo> fileInfoList;
|
||||
|
||||
// Now that we've copied the new log over, lets check the size of the backup folder and trim it as necessary to keep it within appropriate limits
|
||||
AZ::IO::Result res = fileSystem->FindFiles(LOG_BACKUP_PATH, "*",
|
||||
fileSystem->FindFiles(LOG_BACKUP_PATH, "*",
|
||||
[&totalBackupDirectorySize, &fileSystem, &fileInfoList](const char* fileName)
|
||||
{
|
||||
AZ::u64 size;
|
||||
|
||||
@@ -1760,21 +1760,9 @@ XmlNodeRef XmlParserImp::ParseFile(const char* filename, XmlString& errorString,
|
||||
{
|
||||
// not binary XML - refuse to load if in scripts dir and not in bin xml to help reduce hacking
|
||||
// wish we could compile the text xml parser out, but too much work to get everything moved over
|
||||
static const char SCRIPTS_DIR[] = "Scripts/";
|
||||
AZStd::fixed_string<32> strScripts("S");
|
||||
strScripts += "c";
|
||||
strScripts += "r";
|
||||
strScripts += "i";
|
||||
strScripts += "p";
|
||||
strScripts += "t";
|
||||
strScripts += "s";
|
||||
strScripts += "/";
|
||||
AZStd::fixed_string<32> strScripts = {"Scripts/"};
|
||||
// exclude files and PAKs from Mods folder
|
||||
AZStd::fixed_string<8> modsStr("M");
|
||||
modsStr += "o";
|
||||
modsStr += "d";
|
||||
modsStr += "s";
|
||||
modsStr += "/";
|
||||
AZStd::fixed_string<8> modsStr = {"Mods/"};
|
||||
if (_strnicmp(filename, strScripts.c_str(), strScripts.length()) == 0 &&
|
||||
_strnicmp(adjustedFilename.c_str(), modsStr.c_str(), modsStr.length()) != 0 &&
|
||||
_strnicmp(pakPath.c_str(), modsStr.c_str(), modsStr.length()) != 0)
|
||||
|
||||
Reference in New Issue
Block a user