From 186f32029de94c44cf02f800734b1d4eb820106c Mon Sep 17 00:00:00 2001 From: Shakyan Kushwaha Date: Wed, 11 Dec 2024 01:22:54 +0530 Subject: [PATCH] Improve Macro Safety and Casting Practices: remove trailing semicolon --- velox/common/base/SpillStats.cpp | 2 +- velox/core/Metaprogramming.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/velox/common/base/SpillStats.cpp b/velox/common/base/SpillStats.cpp index 7018a13e7b8a..5c5e51014b78 100644 --- a/velox/common/base/SpillStats.cpp +++ b/velox/common/base/SpillStats.cpp @@ -134,7 +134,7 @@ bool SpillStats::operator<(const SpillStats& other) const { } else if (counter > other.counter) { \ ++gtCount; \ } \ - } while (0); + } while (0) UPDATE_COUNTER(spillRuns); UPDATE_COUNTER(spilledInputBytes); diff --git a/velox/core/Metaprogramming.h b/velox/core/Metaprogramming.h index 317837bfb98a..955ea4122b46 100644 --- a/velox/core/Metaprogramming.h +++ b/velox/core/Metaprogramming.h @@ -151,7 +151,7 @@ struct has_method { -> decltype(std::declval<__T>().MethodName(args...)) { \ return {}; \ } \ - }; + } // Calling Name::resolve::type will return T::TypeName if T::TypeName // exists, and otherwise will return T::OtherTypeName (it's existence is not @@ -169,5 +169,5 @@ struct has_method { std::void_t> { \ using type = typename __T::TypeName; \ }; \ - }; + } } // namespace facebook::velox::util