mirror of
https://github.com/Ed94/metadesk.git
synced 2026-06-21 11:25:00 -07:00
c11.refactor (base should be mapped)
This commit is contained in:
@@ -295,7 +295,7 @@ os_full_path_from_path_alloc(AllocatorInfo ainfo, String8 path)
|
||||
realpath((char *)path_copy.str, buffer);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
String8 result = str8_copy(ainfo, str8_cstring(buffer));
|
||||
String8 result = alloc_str8_copy(ainfo, str8_cstring(buffer));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ os_get_current_path(Arena* arena) {
|
||||
inline String8
|
||||
os_get_current_path(AllocatorInfo ainfo) {
|
||||
char* cwdir = getcwd(0, 0);
|
||||
String8 string = str8_copy(ainfo, str8_cstring(cwdir));
|
||||
String8 string = alloc_str8_copy(ainfo, str8_cstring(cwdir));
|
||||
return string;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -315,7 +315,7 @@ os_string_from_guid(Arena* arena, OS_Guid guid) {
|
||||
|
||||
inline String8
|
||||
os_string_from_guid(AllocatorInfo ainfo, OS_Guid guid) {
|
||||
String8 result = str8f(ainfo,
|
||||
String8 result = alloc_str8f(ainfo,
|
||||
"%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X",
|
||||
guid.data1,
|
||||
guid.data2,
|
||||
|
||||
Reference in New Issue
Block a user