8000 change const char** to const char* const* in TextSplit · RobLoach/raylib-cpp@536e7d0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 536e7d0

Browse files
committed
change const char** to const char* const* in TextSplit
::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.
1 parent e540159 commit 536e7d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/Functions.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ TextReplace(const std::string& text, const std::string& replace, const std::stri
393393
*/
394394
[[maybe_unused]] RLCPPAPI std::vector<std::string> TextSplit(const std::string& text, char delimiter) {
395395
int count;
396-
const char** split = ::TextSplit(text.c_str(), delimiter, &count);
396+
const char* const* split = ::TextSplit(text.c_str(), delimiter, &count);
397397
return std::vector<std::string>(split, split + count);
398398
}
399399

0 commit comments

Comments
 (0)
0