File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,10 @@ class small_mapt
146146 if (n == 0 )
147147 return nullptr ;
148148
149- T *mem = (T *)realloc (ptr, sizeof (T) * n);
149+ // explicitly cast to char * as GCC 8 warns about not using new/delete for
150+ // class sharing_node_innert<dstringt, std::basic_string<char>,
151+ // std::equal_to<dstringt> >
152+ T *mem = (T *)realloc ((char *)ptr, sizeof (T) * n);
150153
151154 if (!mem)
152155 throw std::bad_alloc ();
@@ -486,7 +489,11 @@ class small_mapt
486489 std::size_t n = size ();
487490 if (ii < n - 1 )
488491 {
489- memmove (p + ii, p + ii + 1 , sizeof (T) * (n - ii - 1 ));
492+ // explicitly cast to char * as GCC 8 warns about not using new/delete
493+ // for
494+ // class sharing_node_innert<dstringt, std::basic_string<char>,
495+ // std::equal_to<dstringt> >
496+ memmove ((char *)(p + ii), p + ii + 1 , sizeof (T) * (n - ii - 1 ));
490497 }
491498
492499 p = allocate (p, n - 1 );
You can’t perform that action at this time.
0 commit comments