finished collaping arena->allocator info code paths

This commit is contained in:
ed
2025-02-10 01:43:33 -05:00
parent fd44c53e57
commit a54d309fbf
10 changed files with 228 additions and 326 deletions
+1 -15
View File
@@ -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)