Skip to content

Change const char** to const char* const* in TextSplit #350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 1, 2025

Conversation

humz2k
Copy link
Contributor

@humz2k humz2k commented Feb 5, 2025

Unsure if I missed something, but was running into a error: cannot initialize a variable of type 'const char **' with an rvalue of type 'char **' when building with the latest raylib version using various versions of clang on a M1 Mac.

::TextSplit returns a char**, so you can't cast to a const char** implicitly. By specifying const char* const*, we allow implicit conversions from both char** and const char**. The strings are copied into the vector anyway, so adding the extra const specifier changes nothing.

::TextSplit returns a char** now, so you can't cast to a const char** implicitly. By specifying const char* const*, we allow implicit conversions from both char** and const char**. The strings are copied into the vector anyway, so adding the extra const specifier changes nothing.
@RobLoach RobLoach merged commit 7d41ebe into RobLoach:master Mar 1, 2025
8 checks passed
@RobLoach
Copy link
Owner

RobLoach commented Mar 1, 2025

Seems okay, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants