mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Refactor some formatting code
This commit is contained in:
@@ -88,24 +88,6 @@ namespace OpenRCT2
|
||||
}
|
||||
}
|
||||
|
||||
template<typename TArg0> static void FormatString(std::stringstream& ss, FmtString::iterator& it, TArg0 arg0)
|
||||
{
|
||||
while (!it.eol())
|
||||
{
|
||||
const auto& token = *it++;
|
||||
if (CanFormatToken(token.kind))
|
||||
{
|
||||
FormatArgument(ss, token.kind, arg0);
|
||||
FormatString(ss, it);
|
||||
}
|
||||
else
|
||||
{
|
||||
ss << token.text;
|
||||
FormatString(ss, it, arg0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template<typename TArg0, typename... TArgs>
|
||||
static void FormatString(std::stringstream& ss, FmtString::iterator& it, TArg0 arg0, TArgs&&... argN)
|
||||
{
|
||||
|
||||
@@ -57,23 +57,12 @@ protected:
|
||||
gOpenRCT2Headless = true;
|
||||
gOpenRCT2NoGraphics = true;
|
||||
_context = CreateContext();
|
||||
bool initialised = _context->Initialise();
|
||||
ASSERT_TRUE(initialised);
|
||||
|
||||
// load_from_sv6(parkPath.c_str());
|
||||
// game_load_init();
|
||||
|
||||
// Changed in some tests. Store to restore its value
|
||||
// _gScreenFlags = gScreenFlags;
|
||||
SUCCEED();
|
||||
ASSERT_TRUE(_context->Initialise());
|
||||
}
|
||||
|
||||
static void TearDownTestCase()
|
||||
{
|
||||
if (_context)
|
||||
_context.reset();
|
||||
|
||||
// gScreenFlags = _gScreenFlags;
|
||||
_context = {};
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user