Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d4406c9 authored by Jiyong Park's avatar Jiyong Park Committed by Gerrit Code Review
Browse files

Merge "Allow SharedRefBase::make to use the deprecated new operator"

parents 59f72059 1cd746b6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -82,7 +82,10 @@ class SharedRefBase {
     */
    template <class T, class... Args>
    static std::shared_ptr<T> make(Args&&... args) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
        T* t = new T(std::forward<Args>(args)...);
#pragma clang diagnostic pop
        // warning: Potential leak of memory pointed to by 't' [clang-analyzer-unix.Malloc]
        return t->template ref<T>();  // NOLINT(clang-analyzer-unix.Malloc)
    }