From eea37046ef0a96fc19615bd26deef25ea7e01f52 Mon Sep 17 00:00:00 2001 From: Misa Date: Sun, 7 Feb 2021 13:03:33 -0800 Subject: [PATCH] Add constness to GCChar() input and switch position of asterisk I personally like putting the asterisk with the type, because despite the language parsing the asterisk as a part of the name, the pointer part is clearly a part of the return type of the function. Also, put constness here, to indicate that the input won't be modified inside the function. --- desktop_version/src/UtilityClass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop_version/src/UtilityClass.cpp b/desktop_version/src/UtilityClass.cpp index 7407753b..ac3476d1 100644 --- a/desktop_version/src/UtilityClass.cpp +++ b/desktop_version/src/UtilityClass.cpp @@ -4,7 +4,7 @@ #include #include -static const char *GCChar(SDL_GameControllerButton button) +static const char* GCChar(const SDL_GameControllerButton button) { if (button == SDL_CONTROLLER_BUTTON_A) {