1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

refactor and format old C++ code

This commit is contained in:
IntelOrca
2016-01-23 18:58:31 +00:00
parent 36a4cd2fa0
commit 4c1605f268
15 changed files with 1107 additions and 864 deletions

View File

@@ -141,4 +141,38 @@ namespace String
{
return DiscardUse(ptr, String::Duplicate(replacement));
}
utf8 * SkipBOM(utf8 * buffer)
{
return (utf8*)SkipBOM(buffer);
}
const utf8 * SkipBOM(const utf8 * buffer)
{
if (buffer[0] == 0xEF && buffer[1] == 0xBB && buffer[2] == 0xBF)
{
return buffer + 3;
}
return buffer;
}
size_t GetCodepointLength(codepoint_t codepoint)
{
return utf8_get_codepoint_length(codepoint);
}
codepoint_t GetNextCodepoint(utf8 * ptr, utf8 * * nextPtr)
{
return GetNextCodepoint((const utf8 *)ptr, (const utf8 * *)nextPtr);
}
codepoint_t GetNextCodepoint(const utf8 * ptr, const utf8 * * nextPtr)
{
return utf8_get_next(ptr, nextPtr);
}
utf8 * WriteCodepoint(utf8 * dst, codepoint_t codepoint)
{
return utf8_write_codepoint(dst, codepoint);
}
}