fixed errors by using the same name for member variables and parameters 14/308714/1
authorSejun Park <sejun79.park@samsung.com>
Fri, 29 Mar 2024 05:31:31 +0000 (14:31 +0900)
committerSejun Park <sejun79.park@samsung.com>
Fri, 29 Mar 2024 06:42:18 +0000 (15:42 +0900)
Change-Id: Ib36e16df41fd1025674c862673ae94dad4442f3a

src/common/mmi-plugin-module-event.h
src/common/mmi-workflow-event.h
src/common/mmi-workflow-output-event.h
src/mmi-cli/mmi-cli-node-tester.cpp
src/mmi-manager/mmi-node-instance.h
src/mmi-manager/mmi-port-instance.h
tests/mmi-manager/workflow-instance/mmi-workflow-instance-tests.cpp

index 5d784c51642ddd0eb4d6c16f8e47893752efd1c8..a5edd9dcabb2bd485a700fb970426cad4cd54a70 100644 (file)
@@ -31,10 +31,10 @@ enum class PLUGIN_MODULE_EVENT_TYPE {
 };
 
 struct PluginModuleEvent {
-    PluginModuleEvent(PLUGIN_MODULE_EVENT_TYPE type) : type(type) {}
+    PluginModuleEvent(PLUGIN_MODULE_EVENT_TYPE type) : type_(type) {}
     virtual ~PluginModuleEvent() = default;
 
-    PLUGIN_MODULE_EVENT_TYPE type;
+    PLUGIN_MODULE_EVENT_TYPE type_;
 };
 
 struct PluginModuleEventOutputGenerated : public PluginModuleEvent {
index e9d6a558996fdf6fe1b21e98b81ec5ea40170b8d..7f8ed6c285f63490cd36c079c09fff1d5ee66751 100644 (file)
@@ -26,10 +26,10 @@ enum class WORKFLOW_EVENT_TYPE {
 };
 
 struct WorkflowEvent {
-    WorkflowEvent(WORKFLOW_EVENT_TYPE type) : type(type) {}
+    WorkflowEvent(WORKFLOW_EVENT_TYPE type) : type_(type) {}
     virtual ~WorkflowEvent() = default;
 
-    WORKFLOW_EVENT_TYPE type;
+    WORKFLOW_EVENT_TYPE type_;
 };
 
 struct WorkflowEventWorkflowCreated : public WorkflowEvent {
index af09d1400a16491655057f5c9d4b025ca0ba0d7c..774f10f8ffaad72a7c31b88cffbf770d86d4f20b 100644 (file)
@@ -29,10 +29,10 @@ enum class WORKFLOW_OUTPUT_EVENT_TYPE {
 };
 
 struct WorkflowOutputEvent {
-    WorkflowOutputEvent(WORKFLOW_OUTPUT_EVENT_TYPE type) : type(type) {}
+    WorkflowOutputEvent(WORKFLOW_OUTPUT_EVENT_TYPE type) : type_(type) {}
     virtual ~WorkflowOutputEvent() = default;
 
-    WORKFLOW_OUTPUT_EVENT_TYPE type;
+    WORKFLOW_OUTPUT_EVENT_TYPE type_;
 };
 
 struct WorkflowOutputEventOutputGenerated : public WorkflowOutputEvent {
index 4f862902173c4a3af0010dba68ca058aeeb9d29f..c0d659e35df9603217b4630d0bb0cd2355bd937f 100644 (file)
@@ -26,14 +26,14 @@ struct PortInstance
     std::string m_name;
     mmi_port_type_e m_port_type;
     mmi_data_type_e m_data_type;
-    mmi_port_callbacks m_callbacks{nullptr,};
+    mmi_port_callbacks m_callbacks{{nullptr}, {nullptr}};
 };
 
 struct NodeInstance
 {
     mmi_node_type_e m_node_type;
 
-    mmi_node_callbacks m_callbacks{nullptr,};
+    mmi_node_callbacks m_callbacks{{nullptr}, {nullptr}, {nullptr}, {nullptr}, {nullptr}, {nullptr}};
 
     std::vector<PortInstance*> m_ports;
 };
index 2f56da13c3cddc816fdc8645e22834141382a2eb..6e4ee01ea2c338e5497421335920d9b5dc65d497 100644 (file)
@@ -80,7 +80,7 @@ protected:
     mmi_node_type_e m_node_type;
     mmi_node_sub_type_e m_node_sub_type;
 
-    mmi_node_callbacks m_callbacks{nullptr,};
+    mmi_node_callbacks m_callbacks{{nullptr}, {nullptr}, {nullptr}, {nullptr}, {nullptr}, {nullptr}};
 
     bool m_suspended{false};
     bool m_activated{false};
index e508a6b8d699aa246722c9b349267f5ae09269a6..f270b08edecc083e1164c9691f1dd8889e88aeb0 100644 (file)
@@ -51,7 +51,7 @@ public:
     void on_output_data_received(mmi_data_h data);
 private:
     std::string m_name;
-    mmi_port_callbacks m_callbacks{nullptr,};
+    mmi_port_callbacks m_callbacks{{nullptr}, {nullptr}};
 
     std::vector<std::shared_ptr<PortInstance>> m_linked_port_instances;
     std::vector<std::shared_ptr<DataGateway>> m_data_gateways;
index 63bc62e7fd5ad712e0dbd5cd1a03e7f417f638fd..04e32804c7ab836436ce91567e6918064228e10f 100644 (file)
@@ -90,32 +90,32 @@ class NodeAttributeSetHistoryItem {
 public:
     NodeAttributeSetHistoryItem() {}
     ~NodeAttributeSetHistoryItem() {
-        if (attribute) {
-            mmi_attribute_destroy(attribute);
+        if (m_attribute) {
+            mmi_attribute_destroy(m_attribute);
         }
     }
     void reset() {
-        type = MMI_NODE_TYPE_NONE;
-        sub_type = std::monostate();
-        if (attribute) {
-            mmi_attribute_destroy(attribute);
-            attribute = nullptr;
+        m_type = MMI_NODE_TYPE_NONE;
+        m_sub_type = std::monostate();
+        if (m_attribute) {
+            mmi_attribute_destroy(m_attribute);
+            m_attribute = nullptr;
         }
     }
     void set_item(
         mmi_node_type_e type,
         mmi_node_sub_type_e sub_type,
         mmi_attribute_h attribute) {
-        this->type = type;
-        this->sub_type = sub_type;
-        if (this->attribute) {
-            mmi_attribute_destroy(this->attribute);
+        m_type = type;
+        m_sub_type = sub_type;
+        if (m_attribute) {
+            mmi_attribute_destroy(m_attribute);
         }
-        mmi_attribute_clone(attribute, &(this->attribute));
+        mmi_attribute_clone(attribute, &(m_attribute));
     }
-    mmi_node_type_e type{MMI_NODE_TYPE_NONE};
-    mmi_node_sub_type_e sub_type{std::monostate()};
-    mmi_attribute_h attribute{nullptr};
+    mmi_node_type_e m_type{MMI_NODE_TYPE_NONE};
+    mmi_node_sub_type_e m_sub_type{std::monostate()};
+    mmi_attribute_h m_attribute{nullptr};
 };
 
 static NodeAttributeSetHistoryItem g_last_node_attribute_set_history;
@@ -238,14 +238,14 @@ TEST_F(WorkflowInstanceTest, WorkflowAttributePassedToNodeAttribute_p) {
     mmi_attribute_h attribute = nullptr;
     mmi_attribute_create(value, "COMMAND", &attribute);
     EXPECT_TRUE(workflow_instance->set_attribute(attribute));
-    EXPECT_EQ(g_last_node_attribute_set_history.type, MMI_NODE_TYPE_PROCESSOR);
-    EXPECT_TRUE(std::holds_alternative<mmi_node_processor_type_e>(g_last_node_attribute_set_history.sub_type));
-    EXPECT_EQ(std::get<mmi_node_processor_type_e>(g_last_node_attribute_set_history.sub_type),
+    EXPECT_EQ(g_last_node_attribute_set_history.m_type, MMI_NODE_TYPE_PROCESSOR);
+    EXPECT_TRUE(std::holds_alternative<mmi_node_processor_type_e>(g_last_node_attribute_set_history.m_sub_type));
+    EXPECT_EQ(std::get<mmi_node_processor_type_e>(g_last_node_attribute_set_history.m_sub_type),
         MMI_NODE_PROCESSOR_TYPE_ASR);
-    EXPECT_TRUE(g_last_node_attribute_set_history.attribute != nullptr);
+    EXPECT_TRUE(g_last_node_attribute_set_history.m_attribute != nullptr);
 
     mmi_primitive_value_h history_item_value;
-    mmi_attribute_get_value(g_last_node_attribute_set_history.attribute, &history_item_value);
+    mmi_attribute_get_value(g_last_node_attribute_set_history.m_attribute, &history_item_value);
 
     mmi_primitive_value_type_e type;
     mmi_primitive_value_get_type(history_item_value, &type);
@@ -280,14 +280,14 @@ TEST_F(WorkflowInstanceTest, WorkflowAttributePassedProperlyAfter2ndInitializati
     mmi_attribute_h attribute = nullptr;
     mmi_attribute_create(value, "COMMAND", &attribute);
     EXPECT_TRUE(workflow_instance->set_attribute(attribute));
-    EXPECT_EQ(g_last_node_attribute_set_history.type, MMI_NODE_TYPE_PROCESSOR);
-    EXPECT_TRUE(std::holds_alternative<mmi_node_processor_type_e>(g_last_node_attribute_set_history.sub_type));
-    EXPECT_EQ(std::get<mmi_node_processor_type_e>(g_last_node_attribute_set_history.sub_type),
+    EXPECT_EQ(g_last_node_attribute_set_history.m_type, MMI_NODE_TYPE_PROCESSOR);
+    EXPECT_TRUE(std::holds_alternative<mmi_node_processor_type_e>(g_last_node_attribute_set_history.m_sub_type));
+    EXPECT_EQ(std::get<mmi_node_processor_type_e>(g_last_node_attribute_set_history.m_sub_type),
         MMI_NODE_PROCESSOR_TYPE_ASR);
-    EXPECT_TRUE(g_last_node_attribute_set_history.attribute != nullptr);
+    EXPECT_TRUE(g_last_node_attribute_set_history.m_attribute != nullptr);
 
     mmi_primitive_value_h history_item_value;
-    mmi_attribute_get_value(g_last_node_attribute_set_history.attribute, &history_item_value);
+    mmi_attribute_get_value(g_last_node_attribute_set_history.m_attribute, &history_item_value);
 
     mmi_primitive_value_type_e type;
     mmi_primitive_value_get_type(history_item_value, &type);
@@ -309,14 +309,14 @@ TEST_F(WorkflowInstanceTest, WorkflowDefaultAttributePassedToNodeAttribute_p) {
 
     EXPECT_NE(workflow_instance, nullptr);
     workflow_instance->initialize();
-    EXPECT_EQ(g_last_node_attribute_set_history.type, MMI_NODE_TYPE_PROCESSOR);
-    EXPECT_TRUE(std::holds_alternative<mmi_node_processor_type_e>(g_last_node_attribute_set_history.sub_type));
-    EXPECT_EQ(std::get<mmi_node_processor_type_e>(g_last_node_attribute_set_history.sub_type),
+    EXPECT_EQ(g_last_node_attribute_set_history.m_type, MMI_NODE_TYPE_PROCESSOR);
+    EXPECT_TRUE(std::holds_alternative<mmi_node_processor_type_e>(g_last_node_attribute_set_history.m_sub_type));
+    EXPECT_EQ(std::get<mmi_node_processor_type_e>(g_last_node_attribute_set_history.m_sub_type),
         MMI_NODE_PROCESSOR_TYPE_ASR);
-    EXPECT_TRUE(g_last_node_attribute_set_history.attribute != nullptr);
+    EXPECT_TRUE(g_last_node_attribute_set_history.m_attribute != nullptr);
 
     mmi_primitive_value_h history_item_value;
-    mmi_attribute_get_value(g_last_node_attribute_set_history.attribute, &history_item_value);
+    mmi_attribute_get_value(g_last_node_attribute_set_history.m_attribute, &history_item_value);
 
     mmi_primitive_value_type_e type;
     mmi_primitive_value_get_type(history_item_value, &type);
@@ -341,19 +341,19 @@ TEST_F(WorkflowInstanceTest, WorkflowDefaultAttributePassedProperlyAfter2ndIniti
     EXPECT_NE(workflow_instance, nullptr);
     workflow_instance->initialize();
 
-    EXPECT_EQ(g_last_node_attribute_set_history.type, MMI_NODE_TYPE_PROCESSOR);
-    EXPECT_TRUE(std::holds_alternative<mmi_node_processor_type_e>(g_last_node_attribute_set_history.sub_type));
-    EXPECT_EQ(std::get<mmi_node_processor_type_e>(g_last_node_attribute_set_history.sub_type),
+    EXPECT_EQ(g_last_node_attribute_set_history.m_type, MMI_NODE_TYPE_PROCESSOR);
+    EXPECT_TRUE(std::holds_alternative<mmi_node_processor_type_e>(g_last_node_attribute_set_history.m_sub_type));
+    EXPECT_EQ(std::get<mmi_node_processor_type_e>(g_last_node_attribute_set_history.m_sub_type),
         MMI_NODE_PROCESSOR_TYPE_ASR);
-    EXPECT_TRUE(g_last_node_attribute_set_history.attribute != nullptr);
+    EXPECT_TRUE(g_last_node_attribute_set_history.m_attribute != nullptr);
 
     char *name = nullptr;
-    mmi_attribute_get_name(g_last_node_attribute_set_history.attribute, &name);
+    mmi_attribute_get_name(g_last_node_attribute_set_history.m_attribute, &name);
     EXPECT_STREQ(name, "CANDIDATE");
     free(name);
 
     mmi_primitive_value_h history_item_value;
-    mmi_attribute_get_value(g_last_node_attribute_set_history.attribute, &history_item_value);
+    mmi_attribute_get_value(g_last_node_attribute_set_history.m_attribute, &history_item_value);
 
     mmi_primitive_value_type_e type;
     mmi_primitive_value_get_type(history_item_value, &type);