mirror of
https://github.com/Ed94/metadesk.git
synced 2026-08-05 07:08:45 +00:00
finished collaping arena->allocator info code paths
This commit is contained in:
@@ -164,7 +164,7 @@ MD_API DWORD os_w32_thread_entry_point(void* ptr);
|
||||
//~ rjf: @os_hooks System/Process Info (Implemented Per-OS)
|
||||
|
||||
inline String8
|
||||
os_get_current_path_alloc(AllocatorInfo ainfo) {
|
||||
os_get_current_path__ainfo(AllocatorInfo ainfo) {
|
||||
String8 name;
|
||||
TempArena scratch = scratch_begin(ainfo);
|
||||
{
|
||||
@@ -177,20 +177,6 @@ os_get_current_path_alloc(AllocatorInfo ainfo) {
|
||||
return name;
|
||||
}
|
||||
|
||||
inline String8
|
||||
os_get_current_path(Arena* arena) {
|
||||
String8 name;
|
||||
TempArena scratch = scratch_begin(&arena, 1);
|
||||
{
|
||||
DWORD length = GetCurrentDirectoryW(0, 0);
|
||||
U16* memory = push_array_no_zero(scratch.arena, U16, length + 1);
|
||||
length = GetCurrentDirectoryW(length + 1, (WCHAR*)memory);
|
||||
name = str8_from(arena, str16(memory, length));
|
||||
}
|
||||
scratch_end(scratch);
|
||||
return name;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: @os_hooks Memory Allocation (Implemented Per-OS)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user