From 3b364d3c77e6277d8c2868a891aadc70d5668c1e Mon Sep 17 00:00:00 2001 From: owent Date: Wed, 4 Dec 2024 15:44:14 +0800 Subject: [PATCH] Fix compiling problem with -mavx2 --- include/common/string_oprs.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/common/string_oprs.h b/include/common/string_oprs.h index 71b2259e..77ff3af5 100644 --- a/include/common/string_oprs.h +++ b/include/common/string_oprs.h @@ -192,10 +192,9 @@ LIBATFRAME_UTILS_API_HEAD_ONLY void reverse(TCH *begin, TCHE end_any) { } --end; + using std::swap; while (begin < end) { - TCH c = *end; - *end = *begin; - *begin = c; + swap(*begin, *end); ++begin; --end; }