From a0bc5d9f3fa23e3c037a39e1f20b7295896ff60d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Thu, 16 Feb 2023 19:36:55 +0200 Subject: [PATCH] Remove unused functions --- src/openrct2/core/String.cpp | 12 ------------ src/openrct2/core/String.hpp | 10 ---------- 2 files changed, 22 deletions(-) diff --git a/src/openrct2/core/String.cpp b/src/openrct2/core/String.cpp index 8bb306a563..907623b806 100644 --- a/src/openrct2/core/String.cpp +++ b/src/openrct2/core/String.cpp @@ -420,18 +420,6 @@ namespace String return result; } - utf8* DiscardUse(utf8** ptr, utf8* replacement) - { - Memory::Free(*ptr); - *ptr = replacement; - return replacement; - } - - utf8* DiscardDuplicate(utf8** ptr, const utf8* replacement) - { - return DiscardUse(ptr, String::Duplicate(replacement)); - } - std::vector Split(std::string_view s, std::string_view delimiter) { if (delimiter.empty()) diff --git a/src/openrct2/core/String.hpp b/src/openrct2/core/String.hpp index e4c34ab8d4..14b2e20815 100644 --- a/src/openrct2/core/String.hpp +++ b/src/openrct2/core/String.hpp @@ -85,16 +85,6 @@ namespace String utf8* Duplicate(const std::string& src); utf8* Duplicate(const utf8* src); - /** - * Helper method to free the string a string pointer points to and set it to a replacement string. - */ - utf8* DiscardUse(utf8** ptr, utf8* replacement); - - /** - * Helper method to free the string a string pointer points to and set it to a copy of a replacement string. - */ - utf8* DiscardDuplicate(utf8** ptr, const utf8* replacement); - /** * Splits the given string by a delimiter and returns the values as a new string array. * @returns the number of values.