Skip to content

Commit ede530d

Browse files
committed
fix build
1 parent 62de80f commit ede530d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

erb/v1/cpp03_zone.hpp.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class zone {
6060
}
6161

6262
void pop() {
63-
auto n = m_head->m_next;
63+
finalizer* n = m_head->m_next;
6464
delete m_head;
6565
m_head = n;
6666
}
@@ -196,7 +196,7 @@ inline char* zone::get_aligned(char* ptr, size_t align) {
196196

197197
inline zone::chunk_list& zone::get_chank_lst() {
198198
if (!m_chunk_list) {
199-
auto ptr = ::malloc(sizeof(chunk_list) + m_chunk_size);
199+
void* ptr = ::malloc(sizeof(chunk_list) + m_chunk_size);
200200
if (!ptr)
201201
throw std::bad_alloc();
202202
m_chunk_list = new (ptr) chunk_list(m_chunk_size, reinterpret_cast<char*>(ptr) + sizeof(chunk_list));
@@ -277,7 +277,7 @@ inline void zone::swap(zone& o) {
277277
using std::swap;
278278
swap(m_chunk_size, o.m_chunk_size);
279279
swap(m_chunk_list, o.m_chunk_list);
280-
swap(m_finalizer_array, o.m_finalizer_array);
280+
swap(m_finalizer_array.m_head, o.m_finalizer_array.m_head);
281281
}
282282

283283
template <typename T>

include/msgpack/v1/detail/cpp03_zone.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class zone {
6060
}
6161

6262
void pop() {
63-
auto n = m_head->m_next;
63+
finalizer* n = m_head->m_next;
6464
delete m_head;
6565
m_head = n;
6666
}
@@ -241,7 +241,7 @@ inline char* zone::get_aligned(char* ptr, size_t align) {
241241

242242
inline zone::chunk_list& zone::get_chank_lst() {
243243
if (!m_chunk_list) {
244-
auto ptr = ::malloc(sizeof(chunk_list) + m_chunk_size);
244+
void* ptr = ::malloc(sizeof(chunk_list) + m_chunk_size);
245245
if (!ptr)
246246
throw std::bad_alloc();
247247
m_chunk_list = new (ptr) chunk_list(m_chunk_size, reinterpret_cast<char*>(ptr) + sizeof(chunk_list));
@@ -322,7 +322,7 @@ inline void zone::swap(zone& o) {
322322
using std::swap;
323323
swap(m_chunk_size, o.m_chunk_size);
324324
swap(m_chunk_list, o.m_chunk_list);
325-
swap(m_finalizer_array, o.m_finalizer_array);
325+
swap(m_finalizer_array.m_head, o.m_finalizer_array.m_head);
326326
}
327327

328328
template <typename T>

0 commit comments

Comments
 (0)