Skip to content

Commit af0a042

Browse files
committed
Fix VS2017 build
From commit Im-dex/xray-162@7c6d8f1
1 parent 4417a1b commit af0a042

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Layers/xrRender/r__dsgraph_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ class doug_lea_alloc
4343
void deallocate(pointer p, size_type n) const { g_render_allocator.free_impl((void*&)p); }
4444
void deallocate(void* p, size_type n) const { g_render_allocator.free_impl(p); }
4545
char* __charalloc(size_type n) { return (char*)allocate(n); }
46-
void construct(pointer p, const T& _Val) { std::_Construct(p, _Val); }
47-
void destroy(pointer p) { std::_Destroy(p); }
46+
void construct(pointer p, const T& _Val) { new(p) T(_Val); }
47+
void destroy(pointer p) { p->~T(); }
4848
size_type max_size() const
4949
{
5050
size_type _Count = (size_type)(-1) / sizeof(T);

src/xrCore/_stl_extensions.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ class xalloc
108108
char* _charalloc(size_type n) { return (char*)allocate(n); }
109109
void deallocate(pointer p, size_type n) const { xr_free(p); }
110110
void deallocate(void* p, size_type n) const { xr_free(p); }
111-
void construct(pointer p, const T& _Val) { std::_Construct(p, _Val); }
112-
void destroy(pointer p) { std::_Destroy(p); }
111+
void construct(pointer p, const T& _Val) { new(p) T(_Val); }
112+
void destroy(pointer p) { p->~T(); }
113113
size_type max_size() const
114114
{
115115
size_type _Count = (size_type)(-1) / sizeof(T);

0 commit comments

Comments
 (0)