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

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

commit 87806a0137269e0a41862589c5c80c81933900e6
Author: yujun <[email protected]>
AuthorDate: Thu Apr 11 10:40:45 2024 +0800

    [fix](debug point) fix gcc compile (#33451)
---
 be/src/util/debug_points.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/be/src/util/debug_points.h b/be/src/util/debug_points.h
index 2288c19b3ce..0c1607907e6 100644
--- a/be/src/util/debug_points.h
+++ b/be/src/util/debug_points.h
@@ -159,7 +159,9 @@ public:
     void add(const std::string& name) { add(name, 
std::make_shared<DebugPoint>()); }
     void add_with_params(const std::string& name,
                          const std::map<std::string, std::string>& params) {
-        add(name, std::shared_ptr<DebugPoint>(new DebugPoint {.params = 
params}));
+        auto debug_point = std::make_shared<DebugPoint>();
+        debug_point->params = params;
+        add(name, debug_point);
     }
     template <typename T>
     void add_with_value(const std::string& name, const T& value) {
@@ -168,7 +170,9 @@ public:
 
     template <typename... ARGS>
     void add_with_callback(const std::string& name, 
std::function<void(ARGS...)> callback) {
-        add(name, std::shared_ptr<DebugPoint>(new DebugPoint {.callback = 
callback}));
+        auto debug_point = std::make_shared<DebugPoint>();
+        debug_point->callback = callback;
+        add(name, debug_point);
     }
 
     static DebugPoints* instance();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to