From f8187c2d5e082af771d334b1724e86112b9f4aad Mon Sep 17 00:00:00 2001 From: Saint Wish <6036821+SaintWish@users.noreply.github.com> Date: Fri, 27 Sep 2024 01:18:00 -0500 Subject: [PATCH] make more stuff const --- src/game/shared/ms/script.cpp | 2 +- src/game/shared/ms/script.h | 2 +- src/game/shared/weapons/giattack.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/shared/ms/script.cpp b/src/game/shared/ms/script.cpp index 767b567..ad68993 100644 --- a/src/game/shared/ms/script.cpp +++ b/src/game/shared/ms/script.cpp @@ -352,7 +352,7 @@ msstring_ref CScript::GetConst(msstring_ref Text) return Text; } -bool GetString(char* Return, size_t size, const char* sentence, int start, char* endchars) +bool GetString(char* Return, size_t size, const char* sentence, int start, const char* endchars) { // Quickie function to return the next CMD or parameter in a script string int i = 0, n, iPosition = start, endCharSize = strlen(endchars); diff --git a/src/game/shared/ms/script.h b/src/game/shared/ms/script.h index 33ba449..5087436 100644 --- a/src/game/shared/ms/script.h +++ b/src/game/shared/ms/script.h @@ -383,7 +383,7 @@ class CScript : public IVariables #undef SCRIPTVAR #define SCRIPTVAR GetFirstScriptVar -bool GetString(char *Return, size_t size, const char *sentence, int start, char *endchars); +bool GetString(char *Return, size_t size, const char *sentence, int start, const char *endchars); ::mslist GetParams(std::string const &str); void ReplaceChar(char *pString, char org, char dest); float GetNumeric(const char *pszText); diff --git a/src/game/shared/weapons/giattack.cpp b/src/game/shared/weapons/giattack.cpp index d510c87..fec71c7 100644 --- a/src/game/shared/weapons/giattack.cpp +++ b/src/game/shared/weapons/giattack.cpp @@ -26,7 +26,7 @@ #endif //extern iBeam; -bool GetString(char *Return, size_t size, const char *sentence, int start, char *endchars); +bool GetString(char *Return, size_t size, const char *sentence, int start, const char *endchars); #define ReadStat(Name, StatVar, PropVar) \ { \ Temp = GetFirstScriptVar(Name); \