From: Andrei Pavel Date: Mon, 31 Oct 2022 13:31:29 +0000 (+0200) Subject: [#2601] typedef -> using X-Git-Tag: Kea-2.3.3~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62262376eb4a3a5eaffcb6eb2fff4251fc2af3dd;p=thirdparty%2Fkea.git [#2601] typedef -> using --- diff --git a/src/bin/netconf/control_socket.h b/src/bin/netconf/control_socket.h index 1fd8555fbe..d65d4797e4 100644 --- a/src/bin/netconf/control_socket.h +++ b/src/bin/netconf/control_socket.h @@ -102,7 +102,7 @@ public: }; // ControlSocketBase /// @brief Type definition for the pointer to the @c ControlSocketBase. -typedef boost::shared_ptr ControlSocketBasePtr; +using ControlSocketBasePtr = boost::shared_ptr; /// @brief Factory template for control sockets. /// diff --git a/src/bin/netconf/http_control_socket.h b/src/bin/netconf/http_control_socket.h index 94a495f65e..f42cb5423c 100644 --- a/src/bin/netconf/http_control_socket.h +++ b/src/bin/netconf/http_control_socket.h @@ -73,7 +73,7 @@ private: }; // HttpControlSocket /// @brief Type definition for the pointer to the @c HttpControlSocket. -typedef boost::shared_ptr HttpControlSocketPtr; +using HttpControlSocketPtr = boost::shared_ptr; /// @brief Factory template specialization for http control sockets. /// diff --git a/src/bin/netconf/netconf.h b/src/bin/netconf/netconf.h index e53252d6d1..7a23f1d734 100644 --- a/src/bin/netconf/netconf.h +++ b/src/bin/netconf/netconf.h @@ -26,7 +26,7 @@ namespace netconf { class NetconfAgent; /// @brief Type definition for the pointer to the @c NetconfAgent. -typedef boost::shared_ptr NetconfAgentPtr; +using NetconfAgentPtr = boost::shared_ptr; /// @brief Netconf agent. /// diff --git a/src/bin/netconf/netconf_cfg_mgr.h b/src/bin/netconf/netconf_cfg_mgr.h index a7c9f5a67a..b9a8279665 100644 --- a/src/bin/netconf/netconf_cfg_mgr.h +++ b/src/bin/netconf/netconf_cfg_mgr.h @@ -20,7 +20,7 @@ namespace netconf { class NetconfConfig; /// @brief Pointer to a configuration context. -typedef boost::shared_ptr NetconfConfigPtr; +using NetconfConfigPtr = boost::shared_ptr; /// @brief Netconf Configuration Context. /// @@ -177,7 +177,7 @@ protected: }; // NetconfCfgMgr /// @brief Defines a shared pointer to NetconfCfgMgr. -typedef boost::shared_ptr NetconfCfgMgrPtr; +using NetconfCfgMgrPtr = boost::shared_ptr; } // namespace netconf } // namespace isc diff --git a/src/bin/netconf/netconf_config.h b/src/bin/netconf/netconf_config.h index ab8bab4cb5..2c657d299e 100644 --- a/src/bin/netconf/netconf_config.h +++ b/src/bin/netconf/netconf_config.h @@ -141,7 +141,7 @@ private: }; // CfgControlSocket /// @brief Defines a pointer for CfgControlSocket instances. -typedef boost::shared_ptr CfgControlSocketPtr; +using CfgControlSocketPtr = boost::shared_ptr; /// @brief Represents a Managed CfgServer. /// @@ -270,16 +270,16 @@ private: }; // CfgServer /// @brief Defines a pointer for CfgServer instances. -typedef boost::shared_ptr CfgServerPtr; +using CfgServerPtr = boost::shared_ptr; /// @brief Defines a map of CfgServers, keyed by the name. -typedef std::map CfgServersMap; +using CfgServersMap = std::map; /// @brief Defines a iterator pairing of name and CfgServer -typedef std::pair CfgServersMapPair; +using CfgServersMapPair = std::pair; /// @brief Defines a pointer to map of CfgServers. -typedef boost::shared_ptr CfgServersMapPtr; +using CfgServersMapPtr = boost::shared_ptr; /// @brief Dumps the contents of a CfgServer as text to a output stream. /// diff --git a/src/bin/netconf/netconf_controller.h b/src/bin/netconf/netconf_controller.h index 34ebb3424a..a36605a380 100644 --- a/src/bin/netconf/netconf_controller.h +++ b/src/bin/netconf/netconf_controller.h @@ -77,7 +77,7 @@ private: }; // NetconfController // @Defines a shared pointer to NetconfController -typedef boost::shared_ptr NetconfControllerPtr; +using NetconfControllerPtr = boost::shared_ptr; } // namespace netconf } // namespace isc diff --git a/src/bin/netconf/netconf_process.h b/src/bin/netconf/netconf_process.h index 27409cc6ab..2aa69fc783 100644 --- a/src/bin/netconf/netconf_process.h +++ b/src/bin/netconf/netconf_process.h @@ -98,7 +98,7 @@ private: }; // NetconfProcess /// @brief Defines a shared pointer to NetconfProcess. -typedef boost::shared_ptr NetconfProcessPtr; +using NetconfProcessPtr = boost::shared_ptr; } // namespace netconf } // namespace isc diff --git a/src/bin/netconf/stdout_control_socket.h b/src/bin/netconf/stdout_control_socket.h index 20fa2b58db..f14461701a 100644 --- a/src/bin/netconf/stdout_control_socket.h +++ b/src/bin/netconf/stdout_control_socket.h @@ -74,7 +74,7 @@ protected: }; // StdoutControlSocket /// @brief Type definition for the pointer to the @c StdoutControlSocket. -typedef boost::shared_ptr StdoutControlSocketPtr; +using StdoutControlSocketPtr = boost::shared_ptr; /// @brief Factory template specialization for stdout control sockets. /// diff --git a/src/bin/netconf/tests/control_socket_unittests.cc b/src/bin/netconf/tests/control_socket_unittests.cc index 84b224b784..bebfae8f35 100644 --- a/src/bin/netconf/tests/control_socket_unittests.cc +++ b/src/bin/netconf/tests/control_socket_unittests.cc @@ -42,7 +42,7 @@ using isc::yang::test::SysrepoSetup; namespace { /// @brief Type definition for the pointer to Thread objects. -typedef boost::shared_ptr ThreadPtr; +using ThreadPtr = boost::shared_ptr; //////////////////////////////// STDOUT //////////////////////////////// @@ -61,7 +61,7 @@ public: }; // TestStdoutControlSocket /// @brief Type definition for the pointer to the @c TestStdoutControlSocket. -typedef boost::shared_ptr TestStdoutControlSocketPtr; +using TestStdoutControlSocketPtr = boost::shared_ptr; // Verifies that the createControlSocket template can create a stdout // control socket. @@ -408,16 +408,16 @@ const string SERVER_ADDRESS = "127.0.0.1"; const uint16_t SERVER_PORT = 18123; /// @brief Test HTTP JSON response. -typedef TestHttpResponseBase Response; +using Response = TestHttpResponseBase; /// @brief Pointer to test HTTP JSON response. -typedef boost::shared_ptr ResponsePtr; +using ResponsePtr = boost::shared_ptr; /// @brief Generic test HTTP response. -typedef TestHttpResponseBase GenericResponse; +using GenericResponse = TestHttpResponseBase; /// @brief Pointer to generic test HTTP response. -typedef boost::shared_ptr GenericResponsePtr; +using GenericResponsePtr = boost::shared_ptr; /// @brief Implementation of the HttpResponseCreator. /// diff --git a/src/bin/netconf/tests/netconf_unittests.cc b/src/bin/netconf/tests/netconf_unittests.cc index 4b87dbddad..e64f75ba77 100644 --- a/src/bin/netconf/tests/netconf_unittests.cc +++ b/src/bin/netconf/tests/netconf_unittests.cc @@ -53,7 +53,7 @@ namespace { const string TEST_SOCKET = "test-socket"; /// @brief Type definition for the pointer to Thread objects. -typedef boost::shared_ptr ThreadPtr; +using ThreadPtr = boost::shared_ptr; /// @brief Test version of the NetconfAgent class. class NakedNetconfAgent : public NetconfAgent { @@ -72,7 +72,7 @@ public: }; // NakedNetconfAgent /// @brief Type definition for the pointer to NakedNetconfAgent objects. -typedef boost::shared_ptr NakedNetconfAgentPtr; +using NakedNetconfAgentPtr = boost::shared_ptr; /// @brief Clear YANG configuration. /// diff --git a/src/bin/netconf/tests/parser_unittests.cc b/src/bin/netconf/tests/parser_unittests.cc index 186c149440..cabfe4a335 100644 --- a/src/bin/netconf/tests/parser_unittests.cc +++ b/src/bin/netconf/tests/parser_unittests.cc @@ -771,7 +771,7 @@ void loadFile(const string& fname, ElementPtr list) { // This test checks that all map entries are in the sample file. TEST(ParserTest, mapEntries) { // Type of keyword set. - typedef set KeywordSet; + using KeywordSet = set; // Get keywords from the syntax file (netconf_parser.yy). ifstream syntax_file(SYNTAX_FILE); diff --git a/src/bin/netconf/unix_control_socket.h b/src/bin/netconf/unix_control_socket.h index fb6b725b08..f4d1c06611 100644 --- a/src/bin/netconf/unix_control_socket.h +++ b/src/bin/netconf/unix_control_socket.h @@ -73,7 +73,7 @@ private: }; // UnixControlSocket /// @brief Type definition for the pointer to the @c UnixControlSocket. -typedef boost::shared_ptr UnixControlSocketPtr; +using UnixControlSocketPtr = boost::shared_ptr; /// @brief Factory template specialization for unix control sockets. /// diff --git a/src/lib/yang/adaptor_option.h b/src/lib/yang/adaptor_option.h index 8e5aa551ac..66af45df9e 100644 --- a/src/lib/yang/adaptor_option.h +++ b/src/lib/yang/adaptor_option.h @@ -21,7 +21,7 @@ namespace yang { /// /// The map is used to store space+name to code mappings so for /// an option data without a code entry the code entry can be supplied. -typedef std::map OptionCodes; +using OptionCodes = std::map; /// @brief JSON adaptor for option data or definition setting defaults. /// diff --git a/src/lib/yang/adaptor_subnet.h b/src/lib/yang/adaptor_subnet.h index 3268d77a60..ad0d279708 100644 --- a/src/lib/yang/adaptor_subnet.h +++ b/src/lib/yang/adaptor_subnet.h @@ -15,7 +15,7 @@ namespace isc { namespace yang { /// @brief Set of SubnetIDs. -typedef std::set SubnetIDSet; +using SubnetIDSet = std::set; /// @brief JSON adaptor for subnets adding IDs and canonizes relays. /// diff --git a/src/lib/yang/testutils/translator_test.h b/src/lib/yang/testutils/translator_test.h index c82954189a..a3127b2157 100644 --- a/src/lib/yang/testutils/translator_test.h +++ b/src/lib/yang/testutils/translator_test.h @@ -141,10 +141,10 @@ private: }; // YangRepr /// @brief Alias for Items. -typedef YangRepr::YangReprItem YRItem; +using YRItem = YangRepr::YangReprItem; /// @brief Alias for Trees. -typedef YangRepr::Tree YRTree; +using YRTree = YangRepr::Tree; /// @brief Overrides standard output operator for LeafBaseType. std::ostream& operator<<(std::ostream& os, libyang::LeafBaseType type);