Make the string type elements "immutable", akin to char const * in C

Allows for extra security and optimization benefits
This commit is contained in:
gingerBill
2019-12-01 14:10:59 +00:00
parent 7fbe0a6f23
commit 9db81498d8
25 changed files with 255 additions and 176 deletions

View File

@@ -753,8 +753,8 @@ String path_to_full_path(gbAllocator a, String path) {
String res = string_trim_whitespace(make_string_c(fullpath));
#if defined(GB_SYSTEM_WINDOWS)
for (isize i = 0; i < res.len; i++) {
if (res[i] == '\\') {
res[i] = '/';
if (res.text[i] == '\\') {
res.text[i] = '/';
}
}
#endif