Remove UTIL_Format() and UTIL_VarArgs()

This commit is contained in:
Arkshine
2015-10-01 11:06:04 +02:00
parent f22dc769f4
commit 138b9e1510
39 changed files with 112 additions and 173 deletions

View File

@ -3134,24 +3134,6 @@ unsigned short FixedUnsigned16( float value, float scale )
}
#endif // USE_METAMOD
size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
size_t len = vsnprintf(buffer, maxlength, fmt, ap);
va_end(ap);
if (len >= maxlength)
{
buffer[maxlength - 1] = '\0';
return (maxlength - 1);
}
else
{
return len;
}
}
template unsigned int strncopy<char, char>(char *, const char *src, size_t count);
template unsigned int strncopy<cell, char>(cell *, const char *src, size_t count);
template unsigned int strncopy<cell, cell>(cell *, const cell *src, size_t count);

View File

@ -2508,7 +2508,6 @@ void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, cons
#endif //MEMORY_TEST
size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...);
template <typename D, typename S> unsigned int strncopy(D *dest, const S *src, size_t count);
#endif // #ifndef __AMXXMODULE_H__