From b2edf82b69d4672f26a8747a3e1dc42c2d3d285c Mon Sep 17 00:00:00 2001 From: Rubidium Date: Thu, 22 Jun 2023 18:49:32 +0200 Subject: [PATCH] Cleanup: remove unneeded CopyOutDParam version with StringID --- src/error_gui.cpp | 2 +- src/strings.cpp | 11 ----------- src/strings_func.h | 1 - 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/error_gui.cpp b/src/error_gui.cpp index 07873e2114..39809797a0 100644 --- a/src/error_gui.cpp +++ b/src/error_gui.cpp @@ -122,7 +122,7 @@ void ErrorMessageData::CopyOutDParams() /* Get parameters using type information */ if (this->textref_stack_size > 0) StartTextRefStackUsage(this->textref_stack_grffile, this->textref_stack_size, this->textref_stack); - CopyOutDParam(this->params, 20, this->detailed_msg == INVALID_STRING_ID ? this->summary_msg : this->detailed_msg); + CopyOutDParam(this->params, 20); if (this->textref_stack_size > 0) StopTextRefStackUsage(); } diff --git a/src/strings.cpp b/src/strings.cpp index c4e095cf72..1e243b42da 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -187,17 +187,6 @@ void CopyOutDParam(std::vector &backup, size_t num) } } -/** - * Copy \a num string parameters from the global string parameter array to the \a backup. - * @param backup The backup to write to. - * @param num Number of string parameters to copy. - * @param string The string used to determine where raw strings are and where there are no raw strings. - */ -void CopyOutDParam(std::vector &backup, size_t num, StringID string) -{ - CopyOutDParam(backup, num); -} - /** * Checks whether the global string parameters have changed compared to the given backup. * @param backup The backup to check against. diff --git a/src/strings_func.h b/src/strings_func.h index 3518725c68..afabbe33ea 100644 --- a/src/strings_func.h +++ b/src/strings_func.h @@ -88,7 +88,6 @@ void SetDParamStr(size_t n, std::string &&str) = delete; // block passing tempor void CopyInDParam(const span backup); void CopyOutDParam(std::vector &backup, size_t num); -void CopyOutDParam(std::vector &backup, size_t num, StringID string); bool HaveDParamChanged(const std::vector &backup); uint64_t GetDParam(size_t n);