mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-19 20:49:11 +00:00
Codechange: Use std::variant to store string parameter data.
This avoids storing two separate values and makes the test for which type is held clearer. This replaces use of unique_ptr for conditionally storing a string, and is also used in place of StringParameterBackup.
This commit is contained in:
@@ -18,7 +18,7 @@ TEST_CASE("HaveDParamChanged")
|
||||
SetDParam(0, 0);
|
||||
SetDParamStr(1, "some string");
|
||||
|
||||
std::vector<StringParameterBackup> backup;
|
||||
std::vector<StringParameterData> backup;
|
||||
CopyOutDParam(backup, 2);
|
||||
|
||||
CHECK(HaveDParamChanged(backup) == false);
|
||||
|
Reference in New Issue
Block a user