From b7ca408076615b5406262f9197930e134efb4374 Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 19 Mar 2021 16:41:41 -0700 Subject: [PATCH] Remove default arguments from createtextbox() These default arguments are never used anywhere. And if they were used anywhere, it'd be better to explicitly say 255,255,255 than make readers have to look at the header file to see what these default to. Also, this creates four different overloads of createtextbox(), instead of only two - but we ought to not be using function overloading anyway. --- desktop_version/src/Graphics.cpp | 2 +- desktop_version/src/Graphics.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 4b8f8d8e..4596c87b 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -1274,7 +1274,7 @@ void Graphics::textboxadjust(void) } -void Graphics::createtextbox( std::string t, int xp, int yp, int r/*= 255*/, int g/*= 255*/, int b /*= 255*/ ) +void Graphics::createtextbox( std::string t, int xp, int yp, int r, int g, int b) { m = textbox.size(); diff --git a/desktop_version/src/Graphics.h b/desktop_version/src/Graphics.h index 7738bbef..1f98ad7a 100644 --- a/desktop_version/src/Graphics.h +++ b/desktop_version/src/Graphics.h @@ -51,7 +51,7 @@ public: void setwarprect(int a, int b, int c, int d); - void createtextbox(std::string t, int xp, int yp, int r= 255, int g= 255, int b = 255); + void createtextbox(std::string t, int xp, int yp, int r, int g, int b); void textboxcenterx(void);