pnoltes commented on a change in pull request #373:
URL: https://github.com/apache/celix/pull/373#discussion_r739814869



##########
File path: libs/framework/include/celix/BundleActivator.h
##########
@@ -25,73 +25,71 @@
 #include "celix_bundle_activator.h"
 #include "celix/BundleContext.h"
 
-namespace celix {
-    namespace impl {
+namespace celix::impl {
 
-        template<typename I>
-        struct BundleActivatorData {
-            long bndId;
-            std::shared_ptr<celix::BundleContext> ctx;
-            std::unique_ptr<I> bundleActivator;
-        };
+    template<typename I>
+    struct BundleActivatorData {
+        long bndId{};
+        std::shared_ptr<celix::BundleContext> ctx;
+        std::unique_ptr<I> bundleActivator;
+    };
 
 
-        template<typename I>
-        typename std::enable_if<std::is_constructible<I, 
std::shared_ptr<celix::BundleContext>>::value, celix_status_t>::type
-        createActivator(celix_bundle_context_t *cCtx, void **out) {
-            auto ctx = std::make_shared<celix::BundleContext>(cCtx);
-            auto act = std::unique_ptr<I>(new I{ctx});
-            auto *data = new BundleActivatorData<I>{ctx->getBundleId(), 
std::move(ctx), std::move(act)};
-            *out = (void *) data;
-            return CELIX_SUCCESS;
-        }
+    template<typename I>
+    typename std::enable_if<std::is_constructible<I, 
std::shared_ptr<celix::BundleContext>>::value, celix_status_t>::type
+    createActivator(celix_bundle_context_t *cCtx, void **out) {
+        auto ctx = std::make_shared<celix::BundleContext>(cCtx);
+        auto act = std::unique_ptr<I>(new I{ctx});

Review comment:
       Will do, will also split the BundleActivator in a C++17 and C++11 part 
so that the BundleActivator is backwards compatible with Celix 2.2.1




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to