File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,10 @@ class small_mapt
146
146
if (n == 0 )
147
147
return nullptr ;
148
148
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);
150
153
151
154
if (!mem)
152
155
throw std::bad_alloc ();
@@ -486,7 +489,11 @@ class small_mapt
486
489
std::size_t n = size ();
487
490
if (ii < n - 1 )
488
491
{
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 ));
490
497
}
491
498
492
499
p = allocate (p, n - 1 );
You can’t perform that action at this time.
0 commit comments