]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#2601] typedef -> using
authorAndrei Pavel <andrei@isc.org>
Mon, 31 Oct 2022 13:31:29 +0000 (15:31 +0200)
committerRazvan Becheriu <razvan@isc.org>
Fri, 25 Nov 2022 16:15:33 +0000 (18:15 +0200)
15 files changed:
src/bin/netconf/control_socket.h
src/bin/netconf/http_control_socket.h
src/bin/netconf/netconf.h
src/bin/netconf/netconf_cfg_mgr.h
src/bin/netconf/netconf_config.h
src/bin/netconf/netconf_controller.h
src/bin/netconf/netconf_process.h
src/bin/netconf/stdout_control_socket.h
src/bin/netconf/tests/control_socket_unittests.cc
src/bin/netconf/tests/netconf_unittests.cc
src/bin/netconf/tests/parser_unittests.cc
src/bin/netconf/unix_control_socket.h
src/lib/yang/adaptor_option.h
src/lib/yang/adaptor_subnet.h
src/lib/yang/testutils/translator_test.h

index 1fd8555fbea18384eb5d7247ccaf7d8019d5f831..d65d4797e47b60443db786c078051df6e53f33f7 100644 (file)
@@ -102,7 +102,7 @@ public:
 };  // ControlSocketBase
 
 /// @brief Type definition for the pointer to the @c ControlSocketBase.
-typedef boost::shared_ptr<ControlSocketBase> ControlSocketBasePtr;
+using ControlSocketBasePtr = boost::shared_ptr<ControlSocketBase>;
 
 /// @brief Factory template for control sockets.
 ///
index 94a495f65e1650269ddff1dc68d9188b9428ae7b..f42cb5423ce1005ad0361b365c65cbc680f09eae 100644 (file)
@@ -73,7 +73,7 @@ private:
 };  // HttpControlSocket
 
 /// @brief Type definition for the pointer to the @c HttpControlSocket.
-typedef boost::shared_ptr<HttpControlSocket> HttpControlSocketPtr;
+using HttpControlSocketPtr = boost::shared_ptr<HttpControlSocket>;
 
 /// @brief Factory template specialization for http control sockets.
 ///
index e53252d6d1aae85fbfd21e2beffe18f4088c33b2..7a23f1d7343a0213a9bacbeac3cf881d9544158f 100644 (file)
@@ -26,7 +26,7 @@ namespace netconf {
 class NetconfAgent;
 
 /// @brief Type definition for the pointer to the @c NetconfAgent.
-typedef boost::shared_ptr<NetconfAgent> NetconfAgentPtr;
+using NetconfAgentPtr = boost::shared_ptr<NetconfAgent>;
 
 /// @brief Netconf agent.
 ///
index a7c9f5a67acc9a8e877edd5e5cbda219b89e451e..b9a8279665e877f1de061b8ebc82ee4ae25e577c 100644 (file)
@@ -20,7 +20,7 @@ namespace netconf {
 
 class NetconfConfig;
 /// @brief Pointer to a configuration context.
-typedef boost::shared_ptr<NetconfConfig> NetconfConfigPtr;
+using NetconfConfigPtr = boost::shared_ptr<NetconfConfig>;
 
 /// @brief Netconf Configuration Context.
 ///
@@ -177,7 +177,7 @@ protected:
 };  // NetconfCfgMgr
 
 /// @brief Defines a shared pointer to NetconfCfgMgr.
-typedef boost::shared_ptr<NetconfCfgMgr> NetconfCfgMgrPtr;
+using NetconfCfgMgrPtr = boost::shared_ptr<NetconfCfgMgr>;
 
 }  // namespace netconf
 }  // namespace isc
index ab8bab4cb5f7aead6184f401195872cf9e39261e..2c657d299effdc253c85403582940dc02b4461e9 100644 (file)
@@ -141,7 +141,7 @@ private:
 };  // CfgControlSocket
 
 /// @brief Defines a pointer for CfgControlSocket instances.
-typedef boost::shared_ptr<CfgControlSocket> CfgControlSocketPtr;
+using CfgControlSocketPtr = boost::shared_ptr<CfgControlSocket>;
 
 /// @brief Represents a Managed CfgServer.
 ///
@@ -270,16 +270,16 @@ private:
 };  // CfgServer
 
 /// @brief Defines a pointer for CfgServer instances.
-typedef boost::shared_ptr<CfgServer> CfgServerPtr;
+using CfgServerPtr = boost::shared_ptr<CfgServer>;
 
 /// @brief Defines a map of CfgServers, keyed by the name.
-typedef std::map<std::string, CfgServerPtr> CfgServersMap;
+using CfgServersMap = std::map<std::string, CfgServerPtr>;
 
 /// @brief Defines a iterator pairing of name and CfgServer
-typedef std::pair<std::string, CfgServerPtr> CfgServersMapPair;
+using CfgServersMapPair = std::pair<std::string, CfgServerPtr>;
 
 /// @brief Defines a pointer to map of CfgServers.
-typedef boost::shared_ptr<CfgServersMap> CfgServersMapPtr;
+using CfgServersMapPtr = boost::shared_ptr<CfgServersMap>;
 
 /// @brief Dumps the contents of a CfgServer as text to a output stream.
 ///
index 34ebb3424a4d8b553a90042e3218ae29634dc648..a36605a3805e6560c94c22657f4d40950a8354f8 100644 (file)
@@ -77,7 +77,7 @@ private:
 };  // NetconfController
 
 // @Defines a shared pointer to NetconfController
-typedef boost::shared_ptr<NetconfController> NetconfControllerPtr;
+using NetconfControllerPtr = boost::shared_ptr<NetconfController>;
 
 }  // namespace netconf
 }  // namespace isc
index 27409cc6ab74851463dce6c6d91a2b049aa9c010..2aa69fc7838c822cb8f2111f21393e81636d7ade 100644 (file)
@@ -98,7 +98,7 @@ private:
 };  // NetconfProcess
 
 /// @brief Defines a shared pointer to NetconfProcess.
-typedef boost::shared_ptr<NetconfProcess> NetconfProcessPtr;
+using NetconfProcessPtr = boost::shared_ptr<NetconfProcess>;
 
 }  // namespace netconf
 }  // namespace isc
index 20fa2b58db13c6bff1912c211c1d03d921e188e5..f14461701a3b63d3b950a0de739201d9534ab3a3 100644 (file)
@@ -74,7 +74,7 @@ protected:
 };  // StdoutControlSocket
 
 /// @brief Type definition for the pointer to the @c StdoutControlSocket.
-typedef boost::shared_ptr<StdoutControlSocket> StdoutControlSocketPtr;
+using StdoutControlSocketPtr = boost::shared_ptr<StdoutControlSocket>;
 
 /// @brief Factory template specialization for stdout control sockets.
 ///
index 84b224b784fa6b85708e4fe53f145a5c8cae5093..bebfae8f3591df8152a94ca3316dd44665a24e59 100644 (file)
@@ -42,7 +42,7 @@ using isc::yang::test::SysrepoSetup;
 namespace {
 
 /// @brief Type definition for the pointer to Thread objects.
-typedef boost::shared_ptr<thread> ThreadPtr;
+using ThreadPtr = boost::shared_ptr<thread>;
 
 //////////////////////////////// STDOUT ////////////////////////////////
 
@@ -61,7 +61,7 @@ public:
 };  // TestStdoutControlSocket
 
 /// @brief Type definition for the pointer to the @c TestStdoutControlSocket.
-typedef boost::shared_ptr<TestStdoutControlSocket> TestStdoutControlSocketPtr;
+using TestStdoutControlSocketPtr = boost::shared_ptr<TestStdoutControlSocket>;
 
 // 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<HttpResponseJson> Response;
+using Response = TestHttpResponseBase<HttpResponseJson>;
 
 /// @brief Pointer to test HTTP JSON response.
-typedef boost::shared_ptr<Response> ResponsePtr;
+using ResponsePtr = boost::shared_ptr<Response>;
 
 /// @brief Generic test HTTP response.
-typedef TestHttpResponseBase<HttpResponse> GenericResponse;
+using GenericResponse = TestHttpResponseBase<HttpResponse>;
 
 /// @brief Pointer to generic test HTTP response.
-typedef boost::shared_ptr<GenericResponse> GenericResponsePtr;
+using GenericResponsePtr = boost::shared_ptr<GenericResponse>;
 
 /// @brief Implementation of the HttpResponseCreator.
 ///
index 4b87dbddad026be95fbdb2e5b4347dd0d3b92ffc..e64f75ba77e42642a2fcc5990139d5a20fbcb100 100644 (file)
@@ -53,7 +53,7 @@ namespace {
 const string TEST_SOCKET = "test-socket";
 
 /// @brief Type definition for the pointer to Thread objects.
-typedef boost::shared_ptr<thread> ThreadPtr;
+using ThreadPtr = boost::shared_ptr<thread>;
 
 /// @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<NakedNetconfAgent> NakedNetconfAgentPtr;
+using NakedNetconfAgentPtr = boost::shared_ptr<NakedNetconfAgent>;
 
 /// @brief Clear YANG configuration.
 ///
index 186c149440becc80e0c0474b305e03fd86901db4..cabfe4a335f894dfa29cfe7b4e22f3299c3084e1 100644 (file)
@@ -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<string> KeywordSet;
+    using KeywordSet = set<string>;
 
     // Get keywords from the syntax file (netconf_parser.yy).
     ifstream syntax_file(SYNTAX_FILE);
index fb6b725b0867f2b93ea2ec7f94348b1183486fdd..f4d1c066112555ac7708e3be87c1e7669681aea1 100644 (file)
@@ -73,7 +73,7 @@ private:
 };  // UnixControlSocket
 
 /// @brief Type definition for the pointer to the @c UnixControlSocket.
-typedef boost::shared_ptr<UnixControlSocket> UnixControlSocketPtr;
+using UnixControlSocketPtr = boost::shared_ptr<UnixControlSocket>;
 
 /// @brief Factory template specialization for unix control sockets.
 ///
index 8e5aa551ac47bb5188adc903b649097d1a300ca5..66af45df9e46494efe9910b2517ac448f9dd0cbd 100644 (file)
@@ -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<std::string, uint16_t> OptionCodes;
+using OptionCodes = std::map<std::string, uint16_t>;
 
 /// @brief JSON adaptor for option data or definition setting defaults.
 ///
index 3268d77a60707c8c96aae322397790ce1a7a43f1..ad0d279708f3991110b989d406b23dc8381ad20d 100644 (file)
@@ -15,7 +15,7 @@ namespace isc {
 namespace yang {
 
 /// @brief Set of SubnetIDs.
-typedef std::set<isc::dhcp::SubnetID> SubnetIDSet;
+using SubnetIDSet = std::set<isc::dhcp::SubnetID>;
 
 /// @brief JSON adaptor for subnets adding IDs and canonizes relays.
 ///
index c82954189a2449f02a69df1dbc489b1f7a11f4b7..a3127b21576be26a8a0bd9154422361c2f9fc294 100644 (file)
@@ -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);