mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-17 03:53:07 +01:00
Remove unused safe_strtrunc()
This commit is contained in:
@@ -266,32 +266,6 @@ int32_t strlogicalcmp(const char* s1, const char* s2)
|
||||
}
|
||||
}
|
||||
|
||||
utf8* safe_strtrunc(utf8* text, size_t size)
|
||||
{
|
||||
assert(text != nullptr);
|
||||
|
||||
if (size == 0)
|
||||
return text;
|
||||
|
||||
const char* sourceLimit = text + size - 1;
|
||||
char* ch = text;
|
||||
char* last = text;
|
||||
while (utf8_get_next(ch, const_cast<const utf8**>(&ch)) != 0)
|
||||
{
|
||||
if (ch <= sourceLimit)
|
||||
{
|
||||
last = ch;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
*last = 0;
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
char* safe_strcpy(char* destination, const char* source, size_t size)
|
||||
{
|
||||
assert(destination != nullptr);
|
||||
|
||||
@@ -32,7 +32,6 @@ void bitcount_init();
|
||||
int32_t bitcount(uint32_t source);
|
||||
int32_t strcicmp(char const* a, char const* b);
|
||||
int32_t strlogicalcmp(char const* a, char const* b);
|
||||
utf8* safe_strtrunc(utf8* text, size_t size);
|
||||
char* safe_strcpy(char* destination, const char* source, size_t num);
|
||||
char* safe_strcat(char* destination, const char* source, size_t size);
|
||||
#if defined(_WIN32)
|
||||
|
||||
Reference in New Issue
Block a user