From 482bd5589bfd9a53e634619a4e50cc99cdf6a1a6 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Tue, 19 Mar 2024 00:35:04 -0500 Subject: [PATCH] Remove private method lookup in dpctl_capi This removes one of static dpctl_capi instance from dpctl_capi definition. This leaves a single static instance created dynamically in get static method. --- dpctl/apis/include/dpctl4pybind11.hpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/dpctl/apis/include/dpctl4pybind11.hpp b/dpctl/apis/include/dpctl4pybind11.hpp index 9006375587..09ecd066f2 100644 --- a/dpctl/apis/include/dpctl4pybind11.hpp +++ b/dpctl/apis/include/dpctl4pybind11.hpp @@ -181,7 +181,7 @@ class dpctl_capi static auto &get() { - static dpctl_capi api = lookup(); + static dpctl_capi api{}; return api; } @@ -404,12 +404,6 @@ class dpctl_capi dpctl_capi &operator=(dpctl_capi const &) = default; dpctl_capi &operator=(dpctl_capi &&) = default; - static dpctl_capi &lookup() - { - static dpctl_capi api; - return api; - } - }; // struct dpctl_capi } // namespace detail } // namespace dpctl