summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2018-05-13 18:34:57 +0100
committerfrosch <github@elsenhans.name>2018-06-27 22:54:46 +0200
commit5f86e1a390b4aa9510d43f97251484ca67934f1c (patch)
tree8a9a74e4beeefb3ebe5585f0f10aac80d2ba078a /src/core
parente1b9187e9b39ff2ce1982a8fbcb4f2a018662ce7 (diff)
downloadopenttd-5f86e1a390b4aa9510d43f97251484ca67934f1c.tar.xz
Codechange: Silence -Wclass-memaccess warnings with GCC8
Diffstat (limited to 'src/core')
-rw-r--r--src/core/alloc_func.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/alloc_func.hpp b/src/core/alloc_func.hpp
index c7e17421f..c33e73301 100644
--- a/src/core/alloc_func.hpp
+++ b/src/core/alloc_func.hpp
@@ -125,7 +125,7 @@ static inline T *ReallocT(T *t_ptr, size_t num_elements)
/* Ensure the size does not overflow. */
CheckAllocationConstraints<T>(num_elements);
- t_ptr = (T*)realloc(t_ptr, num_elements * sizeof(T));
+ t_ptr = (T*)realloc(static_cast<void *>(t_ptr), num_elements * sizeof(T));
if (t_ptr == NULL) ReallocError(num_elements * sizeof(T));
return t_ptr;
}