Fix the confict of declaration and definition between struct and class
This fixes the error when compiling with clang syntax checking
The error message was:
/update_engine/test_utils.h:188:1: error: 'ObjectFeederAction'
defined as a struct template here but previously declared as a
class template [-Werror,-Wmismatched-tags]
BUG=chromium:218781
TEST=USE="chrome_internal" CXXFLAGS="-clang -print-cmdline"
CFLAGS="-clang -print-cmdline" emerge-x86-alex update_engine
Change-Id: Ieac9981c84c4e5779cbf876650f21a5d1b2acd72
Reviewed-on: https://gerrit.chromium.org/gerrit/47476
Reviewed-by: Jay Srinivasan <jaysri@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
Commit-Queue: Yunlian Jiang <yunlian@chromium.org>
diff --git a/action_pipe_unittest.cc b/action_pipe_unittest.cc
index b0a96b7..0f777fb 100644
--- a/action_pipe_unittest.cc
+++ b/action_pipe_unittest.cc
@@ -23,7 +23,8 @@
};
// This is a simple Action class for testing.
-struct ActionPipeTestAction : public Action<ActionPipeTestAction> {
+class ActionPipeTestAction : public Action<ActionPipeTestAction> {
+ public:
typedef string InputObjectType;
typedef string OutputObjectType;
ActionPipe<string>* in_pipe() { return in_pipe_.get(); }
diff --git a/action_processor_unittest.cc b/action_processor_unittest.cc
index 7f39149..20a79af 100644
--- a/action_processor_unittest.cc
+++ b/action_processor_unittest.cc
@@ -23,7 +23,8 @@
};
// This is a simple Action class for testing.
-struct ActionProcessorTestAction : public Action<ActionProcessorTestAction> {
+class ActionProcessorTestAction : public Action<ActionProcessorTestAction> {
+ public:
typedef string InputObjectType;
typedef string OutputObjectType;
ActionPipe<string>* in_pipe() { return in_pipe_.get(); }
diff --git a/action_unittest.cc b/action_unittest.cc
index 8bb94ca..af0e130 100644
--- a/action_unittest.cc
+++ b/action_unittest.cc
@@ -23,7 +23,8 @@
};
// This is a simple Action class for testing.
-struct ActionTestAction : public Action<ActionTestAction> {
+class ActionTestAction : public Action<ActionTestAction> {
+ public:
typedef string InputObjectType;
typedef string OutputObjectType;
ActionPipe<string>* in_pipe() { return in_pipe_.get(); }
diff --git a/omaha_request_action.h b/omaha_request_action.h
index a75139e..528ce19 100644
--- a/omaha_request_action.h
+++ b/omaha_request_action.h
@@ -71,7 +71,7 @@
class NoneType;
class OmahaRequestAction;
-struct OmahaRequestParams;
+class OmahaRequestParams;
class PrefsInterface;
template<>
diff --git a/test_utils.h b/test_utils.h
index 8305c14..30f1f89 100644
--- a/test_utils.h
+++ b/test_utils.h
@@ -185,7 +185,7 @@
// This is a simple Action class for testing. It feeds an object into
// another action.
template<typename T>
-struct ObjectFeederAction : public Action<ObjectFeederAction<T> > {
+class ObjectFeederAction : public Action<ObjectFeederAction<T> > {
public:
typedef NoneType InputObjectType;
typedef T OutputObjectType;
@@ -219,7 +219,7 @@
// This is a simple Action class for testing. It receives an object from
// another action.
template<typename T>
-struct ObjectCollectorAction : public Action<ObjectCollectorAction<T> > {
+class ObjectCollectorAction : public Action<ObjectCollectorAction<T> > {
public:
typedef T InputObjectType;
typedef NoneType OutputObjectType;