Update KeyValues.cpp

This commit is contained in:
0TheSpy
2022-10-29 19:05:44 +03:00
committed by GitHub
parent df213d4355
commit 8dff5a61fb
+6 -6
View File
@@ -1259,22 +1259,22 @@ public:
void ReportError(const char* pError) void ReportError(const char* pError)
{ {
printf("KeyValues Error: %s in file %s\n", pError, m_pFilename); printfdbg("KeyValues Error: %s in file %s\n", pError, m_pFilename);
for (int i = 0; i < m_maxErrorIndex; i++) for (int i = 0; i < m_maxErrorIndex; i++)
{ {
if (m_errorStack[i] != INVALID_KEY_SYMBOL) if (m_errorStack[i] != INVALID_KEY_SYMBOL)
{ {
if (i < m_errorIndex) if (i < m_errorIndex)
{ {
printf("%s, ", iff.keyValuesSystem->GetStringForSymbol(m_errorStack[i])); printfdbg("%s, ", iff.keyValuesSystem->GetStringForSymbol(m_errorStack[i]));
} }
else else
{ {
printf("(*%s*), ", iff.keyValuesSystem->GetStringForSymbol(m_errorStack[i])); printfdbg("(*%s*), ", iff.keyValuesSystem->GetStringForSymbol(m_errorStack[i]));
} }
} }
} }
printf("\n"); printfdbg("\n");
} }
private: private:
@@ -1577,7 +1577,7 @@ void KeyValues::ParseIncludedKeys(char const* resourceName, const char* filetoin
} }
else else
{ {
printf("KeyValues::ParseIncludedKeys: Couldn't load included keyvalue file %s\n", fullpath); printfdbg("KeyValues::ParseIncludedKeys: Couldn't load included keyvalue file %s\n", fullpath);
newKV->deleteThis(); newKV->deleteThis();
} }
@@ -1827,4 +1827,4 @@ bool KeyValues::LoadFromBuffer(char const* resourceName, const char* pBuffer, IB
int nLen = Q_strlen(pBuffer); int nLen = Q_strlen(pBuffer);
CUtlBuffer buf(pBuffer, nLen, CUtlBuffer::READ_ONLY | CUtlBuffer::TEXT_BUFFER); CUtlBuffer buf(pBuffer, nLen, CUtlBuffer::READ_ONLY | CUtlBuffer::TEXT_BUFFER);
return LoadFromBuffer(resourceName, buf, pFileSystem, pPathID); return LoadFromBuffer(resourceName, buf, pFileSystem, pPathID);
} }