mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-08-06 08:01:47 +02:00
Move away from C format to cpp::fmt.
This commit is contained in:
@@ -223,7 +223,7 @@ LightObj SqBuffer::ReadRawString(SQInteger length)
|
||||
// Validate the obtained length
|
||||
if ((m_Buffer->Position() + len) > m_Buffer->Capacity())
|
||||
{
|
||||
STHROWF("String of size (%u) starting at (%u) is out of buffer capacity (%u)",
|
||||
STHROWF("String of size ({}) starting at ({}) is out of buffer capacity ({})",
|
||||
len, m_Buffer->Position(), m_Buffer->Capacity());
|
||||
}
|
||||
// Remember the current stack size
|
||||
@@ -248,7 +248,7 @@ LightObj SqBuffer::ReadClientString()
|
||||
// Validate the obtained length
|
||||
if ((m_Buffer->Position() + sizeof(uint16_t) + length) > m_Buffer->Capacity())
|
||||
{
|
||||
STHROWF("String of size (%u) starting at (%u) is out of buffer capacity (%u)",
|
||||
STHROWF("String of size ({}) starting at ({}) is out of buffer capacity ({})",
|
||||
length, m_Buffer->Position() + sizeof(uint16_t), m_Buffer->Capacity());
|
||||
}
|
||||
// Advance the buffer to the actual string
|
||||
|
@@ -481,7 +481,7 @@ public:
|
||||
}
|
||||
catch (const std::exception & e)
|
||||
{
|
||||
STHROWF("%s", e.what()); // Re-package
|
||||
STHROWF("{}", e.what()); // Re-package
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -19,20 +19,20 @@ void IniResult::Check() const
|
||||
switch (m_Result)
|
||||
{
|
||||
case SI_FAIL:
|
||||
STHROWF("Unable to %s. Probably invalid", m_Action.c_str());
|
||||
STHROWF("Unable to {}. Probably invalid", m_Action);
|
||||
break;
|
||||
case SI_NOMEM:
|
||||
STHROWF("Unable to %s. Ran out of memory", m_Action.c_str());
|
||||
STHROWF("Unable to {}. Ran out of memory", m_Action);
|
||||
break;
|
||||
case SI_FILE:
|
||||
STHROWF("Unable to %s. %s", strerror(errno));
|
||||
STHROWF("Unable to {}. {}", m_Action, strerror(errno));
|
||||
break;
|
||||
case SI_OK:
|
||||
case SI_UPDATED:
|
||||
case SI_INSERTED:
|
||||
break; /* These are not error messages. */
|
||||
default:
|
||||
STHROWF("Unable to %s for some unforeseen reason", m_Action.c_str());
|
||||
STHROWF("Unable to {} for some unforeseen reason", m_Action);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user