From cfdf31730844629c5f3a77750eb1fab41547d9f3 Mon Sep 17 00:00:00 2001 From: veahow <15228088+veahow@users.noreply.github.com> Date: Tue, 11 Oct 2022 19:38:03 +0800 Subject: [PATCH] fix compile warning with gcc 9.1.0 including simplestl.h file --- src/simplestl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/simplestl.h b/src/simplestl.h index b8454c40ae55..83269e784415 100644 --- a/src/simplestl.h +++ b/src/simplestl.h @@ -508,7 +508,7 @@ struct vector { capacity_ = new_size * 2; T* new_data = (T*)new char[capacity_ * sizeof(T)]; - memset(new_data, 0, capacity_ * sizeof(T)); + memset(static_cast(new_data), 0, capacity_ * sizeof(T)); if (data_) { memmove(new_data, data_, sizeof(T) * size_);