You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/06/20 23:42:08 UTC

[doris] branch master updated: [Improvement] make expression for template argument a constexpr (#10268)

This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new f5e5880fb6 [Improvement] make expression for template argument a constexpr (#10268)
f5e5880fb6 is described below

commit f5e5880fb6e412951a56e00a886ebd4e681a039f
Author: Gabriel <ga...@gmail.com>
AuthorDate: Tue Jun 21 07:42:02 2022 +0800

    [Improvement] make expression for template argument a constexpr (#10268)
---
 be/src/exprs/hybrid_set.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/exprs/hybrid_set.h b/be/src/exprs/hybrid_set.h
index 81f71d45f2..642d99af1b 100644
--- a/be/src/exprs/hybrid_set.h
+++ b/be/src/exprs/hybrid_set.h
@@ -86,7 +86,7 @@ public:
     void insert(const void* data) override {
         if (data == nullptr) return;
 
-        if (sizeof(T) >= 16) {
+        if constexpr (sizeof(T) >= 16) {
             // for largeint, it will core dump with no memcpy
             T value;
             memcpy(&value, data, sizeof(T));


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org