Change code to match original MSVC

This commit is contained in:
Ginger Bill
2017-04-10 13:27:09 +01:00
parent aaf355e750
commit 3a3202fbc6
3 changed files with 9 additions and 8 deletions

3
.gitignore vendored
View File

@@ -256,7 +256,8 @@ paket-files/
*.sln
builds/
bin/
*.exe
# - Linux/MacOS
odin
odin.dSYM
odin.dSYM

View File

@@ -1,7 +1,6 @@
@echo off
rem call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 1> NUL
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 1> NUL
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 1> NUL
rem call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86 1> NUL
set _NO_DEBUG_HEAP=1

View File

@@ -4873,7 +4873,7 @@ GB_ALLOCATOR_PROC(gb_heap_allocator_proc) {
case gbAllocation_Resize: {
ptr = realloc(old_memory, size);
// ptr = gb_default_resize_align(gb_heap_allocator(), old_memory, old_size, size, alignment);
} break;
} break;
#else
// TODO(bill): *nix version that's decent
case gbAllocation_Alloc: {
@@ -5086,7 +5086,7 @@ void gb_affinity_init(gbAffinity *a) {
}
#undef AF__CHECK
}
fclose(cpu_info);
}
@@ -7619,10 +7619,11 @@ gbFileError gb_file_close(gbFile *f) {
return gbFileError_Invalid;
}
//
#if defined(GB_COMPILER_MSVC)
if (f->filename) gb_free(gb_heap_allocator(), cast(char *)f->filename);
#else
// TODO HACK(bill): Memory Leak!!!
// if (f->filename) gb_free(gb_heap_allocator(), cast(char *)f->filename);
//
#endif
#if defined(GB_SYSTEM_WINDOWS)
if (f->fd.p == INVALID_HANDLE_VALUE) {