diff options
author | Nan Zhou <nanzhoumails@gmail.com> | 2022-09-20 21:12:13 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2022-09-21 20:01:12 +0300 |
commit | 043bec0965b9e9ba55888440fec4588c28335e5c (patch) | |
tree | 7061051c77ef6c3b76e408f18ccf16fc34bcec35 /redfish-core/include/registries | |
parent | 3590bd1dee5a0e56d4d282f0a1e3cf2c8804dfa1 (diff) | |
download | bmcweb-043bec0965b9e9ba55888440fec4588c28335e5c.tar.xz |
privilege registry: simplify writing headers
This patch reused similar patterns in |REGISTRY_HEADER| so that the
python code is more readable. It also moved the clang-format off macro
and warning a bit in so they are all consistent with each other.
Tested: code compiles.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: If18de0d9f89088f9b5732613ecf59520650bb11a
Diffstat (limited to 'redfish-core/include/registries')
4 files changed, 5 insertions, 5 deletions
diff --git a/redfish-core/include/registries/base_message_registry.hpp b/redfish-core/include/registries/base_message_registry.hpp index c030530d90..cf5861e33c 100644 --- a/redfish-core/include/registries/base_message_registry.hpp +++ b/redfish-core/include/registries/base_message_registry.hpp @@ -1,3 +1,4 @@ +#pragma once /**************************************************************** * READ THIS WARNING FIRST * This is an auto-generated header which contains definitions @@ -8,7 +9,6 @@ * should be first pushed to the relevant registry in the DMTF * github organization. ***************************************************************/ -#pragma once #include <registries.hpp> // clang-format off diff --git a/redfish-core/include/registries/privilege_registry.hpp b/redfish-core/include/registries/privilege_registry.hpp index 035aee4aec..d42d530df3 100644 --- a/redfish-core/include/registries/privilege_registry.hpp +++ b/redfish-core/include/registries/privilege_registry.hpp @@ -9,10 +9,10 @@ * should be first pushed to the relevant registry in the DMTF * github organization. ***************************************************************/ -// clang-format off - #include <privileges.hpp> +// clang-format off + namespace redfish::privileges { const std::array<Privileges, 1> privilegeSetLogin = {{ diff --git a/redfish-core/include/registries/resource_event_message_registry.hpp b/redfish-core/include/registries/resource_event_message_registry.hpp index 3b02cde1c6..d161882467 100644 --- a/redfish-core/include/registries/resource_event_message_registry.hpp +++ b/redfish-core/include/registries/resource_event_message_registry.hpp @@ -1,3 +1,4 @@ +#pragma once /**************************************************************** * READ THIS WARNING FIRST * This is an auto-generated header which contains definitions @@ -8,7 +9,6 @@ * should be first pushed to the relevant registry in the DMTF * github organization. ***************************************************************/ -#pragma once #include <registries.hpp> // clang-format off diff --git a/redfish-core/include/registries/task_event_message_registry.hpp b/redfish-core/include/registries/task_event_message_registry.hpp index 5158ff40c4..94c74d16da 100644 --- a/redfish-core/include/registries/task_event_message_registry.hpp +++ b/redfish-core/include/registries/task_event_message_registry.hpp @@ -1,3 +1,4 @@ +#pragma once /**************************************************************** * READ THIS WARNING FIRST * This is an auto-generated header which contains definitions @@ -8,7 +9,6 @@ * should be first pushed to the relevant registry in the DMTF * github organization. ***************************************************************/ -#pragma once #include <registries.hpp> // clang-format off |