Skip to content

Commit b674a38

Browse files
committed
Fix W3DView compile error
1 parent 4f2d24e commit b674a38

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

Core/Libraries/Source/WWVegas/WWLib/DbgHelpLoader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ bool DbgHelpLoader::load()
5757
if (Inst == NULL)
5858
{
5959
// Cannot use new/delete here when this is loaded during game memory initialization.
60-
void* p = sysAllocateDoNotZero(sizeof(DbgHelpLoader));
60+
void* p = GlobalAlloc(GMEM_FIXED, sizeof(DbgHelpLoader));
6161
Inst = new (p) DbgHelpLoader();
6262
}
6363

@@ -130,7 +130,7 @@ void DbgHelpLoader::unload()
130130
}
131131

132132
Inst->~DbgHelpLoader();
133-
sysFree(Inst);
133+
GlobalFree(Inst);
134134
Inst = NULL;
135135
}
136136

Core/Libraries/Source/WWVegas/WWLib/SystemAllocator.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
#pragma once
2020

21-
#include <cstdlib> // malloc, free
2221
#include <cstddef> // std::size_t, std::ptrdiff_t
2322
#include <new> // std::bad_alloc
2423

@@ -66,15 +65,15 @@ class system_allocator
6665
if (n > max_size())
6766
throw std::bad_alloc();
6867

69-
void* p = sysAllocateDoNotZero(n * sizeof(T));
68+
void* p = GlobalAlloc(GMEM_FIXED, n * sizeof(T));
7069
if (!p)
7170
throw std::bad_alloc();
7271
return static_cast<pointer>(p);
7372
}
7473

7574
void deallocate(pointer p, size_type)
7675
{
77-
sysFree(p);
76+
GlobalFree(p);
7877
}
7978

8079
void construct(pointer p, const T& val)

Core/Libraries/Source/WWVegas/WWLib/always.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@
8080
#endif //_MSC_VER
8181
#endif //RTS_DEBUG
8282

83-
extern void* sysAllocateDoNotZero(size_t numBytes);
84-
extern void sysFree(void* p);
85-
8683
#if !defined(DISABLE_GAMEMEMORY) // (gth) killing the Generals Memory Manager!
8784

8885
#ifndef _OPERATOR_NEW_DEFINED_

0 commit comments

Comments
 (0)