C++ compiler support v2 (#5252)

* Get C++ compilers working

* Fix Formatting
This commit is contained in:
Saksham Goyal
2025-10-15 13:11:44 -04:00
committed by GitHub
parent 17bc628fd9
commit adfe2c1704
20 changed files with 106 additions and 97 deletions

View File

@@ -1731,7 +1731,7 @@ char *TextReplace(const char *text, const char *search, const char *replacement)
// - 'text' points to the remainder of text after "end of replace"
while (count--)
{
insertPoint = strstr(text, search);
insertPoint = (char *)strstr(text, search);
lastReplacePos = (int)(insertPoint - text);
temp = strncpy(temp, text, lastReplacePos) + lastReplacePos;
temp = strcpy(temp, replacement) + replaceLen;
@@ -1887,7 +1887,7 @@ int TextFindIndex(const char *text, const char *search)
{
int position = -1;
char *ptr = strstr(text, search);
char *ptr = (char *)strstr(text, search);
if (ptr != NULL) position = (int)(ptr - text);