aboutsummaryrefslogtreecommitdiff
path: root/src/build_settings.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-08-02 11:00:15 +0100
committergingerBill <gingerBill@users.noreply.github.com>2025-08-02 11:00:15 +0100
commit2561427dd396a69cd49eb02c0814c4e8e8b3a08f (patch)
treed390c6fe5c43b9469c312ebb2af07215eaf92fe1 /src/build_settings.cpp
parent710203eadb605b41e652084297cde54754008b87 (diff)
Add `string16` and `cstring16` (UTF-16 based strings)
Diffstat (limited to 'src/build_settings.cpp')
-rw-r--r--src/build_settings.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp
index 46a4f9ae5..40bbe41e5 100644
--- a/src/build_settings.cpp
+++ b/src/build_settings.cpp
@@ -1089,7 +1089,7 @@ gb_internal String internal_odin_root_dir(void) {
text = gb_alloc_array(permanent_allocator(), wchar_t, len+1);
GetModuleFileNameW(nullptr, text, cast(int)len);
- path = string16_to_string(heap_allocator(), make_string16(text, len));
+ path = string16_to_string(heap_allocator(), make_string16(cast(u16 *)text, len));
for (i = path.len-1; i >= 0; i--) {
u8 c = path[i];
@@ -1387,14 +1387,14 @@ gb_internal String path_to_fullpath(gbAllocator a, String s, bool *ok_) {
mutex_lock(&fullpath_mutex);
- len = GetFullPathNameW(&string16[0], 0, nullptr, nullptr);
+ len = GetFullPathNameW(cast(wchar_t *)&string16[0], 0, nullptr, nullptr);
if (len != 0) {
wchar_t *text = gb_alloc_array(permanent_allocator(), wchar_t, len+1);
- GetFullPathNameW(&string16[0], len, text, nullptr);
+ GetFullPathNameW(cast(wchar_t *)&string16[0], len, text, nullptr);
mutex_unlock(&fullpath_mutex);
text[len] = 0;
- result = string16_to_string(a, make_string16(text, len));
+ result = string16_to_string(a, make_string16(cast(u16 *)text, len));
result = string_trim_whitespace(result);
// Replace Windows style separators