diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/rlparse.d/vector.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/rlparse.d/vector.h b/test/rlparse.d/vector.h index b29c7496..14293de9 100644 --- a/test/rlparse.d/vector.h +++ b/test/rlparse.d/vector.h @@ -651,7 +651,7 @@ template<class T, class Resize> void Vector<T, Resize>:: BaseTable::allocLen = newLen; if ( BaseTable::data != 0 ) { /* Table exists already, resize it up. */ - BaseTable::data = (T*) realloc( BaseTable::data, sizeof(T) * newLen ); + BaseTable::data = (T*) realloc( (void*)BaseTable::data, sizeof(T) * newLen ); if ( BaseTable::data == 0 ) throw std::bad_alloc(); } @@ -682,7 +682,7 @@ template<class T, class Resize> void Vector<T, Resize>:: } else { /* Not shrinking to size zero, realloc it to the smaller size. */ - BaseTable::data = (T*) realloc( BaseTable::data, sizeof(T) * newLen ); + BaseTable::data = (T*) realloc( (void*)BaseTable::data, sizeof(T) * newLen ); if ( BaseTable::data == 0 ) throw std::bad_alloc(); } @@ -1033,7 +1033,7 @@ template<class T, class Resize> void Vector<T, Resize>:: /* Shift data over if necessary. */ lenToSlideOver = BaseTable::tabLen - endPos; if ( len > 0 && lenToSlideOver > 0 ) - memmove(dst, dst + len, sizeof(T)*lenToSlideOver); + memmove((void*)dst, (void*)(dst + len), sizeof(T)*lenToSlideOver); /* Shrink the data if necessary. */ downResize( newLen ); @@ -1067,7 +1067,7 @@ template<class T, class Resize> void Vector<T, Resize>:: /* Shift over data at insert spot if needed. */ if ( len > 0 && pos < BaseTable::tabLen ) { - memmove(BaseTable::data + pos + len, BaseTable::data + pos, + memmove((void*)(BaseTable::data + pos + len), (void*)(BaseTable::data + pos), sizeof(T)*(BaseTable::tabLen-pos)); } @@ -1106,7 +1106,7 @@ template<class T, class Resize> void Vector<T, Resize>:: /* Shift over data at insert spot if needed. */ if ( len > 0 && pos < BaseTable::tabLen ) { - memmove(BaseTable::data + pos + len, BaseTable::data + pos, + memmove((void*)(BaseTable::data + pos + len), (void*)(BaseTable::data + pos), sizeof(T)*(BaseTable::tabLen-pos)); } @@ -1143,7 +1143,7 @@ template<class T, class Resize> void Vector<T, Resize>:: /* Shift over data at insert spot if needed. */ if ( len > 0 && pos < BaseTable::tabLen ) { - memmove(BaseTable::data + pos + len, BaseTable::data + pos, + memmove((void*)(BaseTable::data + pos + len), (void*)(BaseTable::data + pos), sizeof(T)*(BaseTable::tabLen-pos)); } @@ -1170,7 +1170,7 @@ template<class T, class Resize> void Vector<T, Resize>:: /* Shift over data at insert spot if needed. */ if ( len > 0 && pos < BaseTable::tabLen ) { - memmove(BaseTable::data + pos + len, BaseTable::data + pos, + memmove((void*)(BaseTable::data + pos + len), (void*)(BaseTable::data + pos), sizeof(T)*(BaseTable::tabLen-pos)); } |