This is an automated email from the ASF dual-hosted git repository.

masaori pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
     new 8e231ee  Modernize typedef and remove unused aliases
8e231ee is described below

commit 8e231ee8dc6a4ff04e88c4b19156c2c82042e4b1
Author: Masaori Koshiba <masa...@apache.org>
AuthorDate: Fri Aug 25 13:52:21 2017 +0900

    Modernize typedef and remove unused aliases
---
 iocore/net/P_QUICNetVConnection.h | 6 +-----
 iocore/net/quic/QUICFrame.h       | 2 +-
 iocore/net/quic/QUICTypes.h       | 8 ++++----
 3 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/iocore/net/P_QUICNetVConnection.h 
b/iocore/net/P_QUICNetVConnection.h
index 785f30b..bfb96af 100644
--- a/iocore/net/P_QUICNetVConnection.h
+++ b/iocore/net/P_QUICNetVConnection.h
@@ -99,8 +99,6 @@ typedef enum {
 //
 //////////////////////////////////////////////////////////////////
 
-typedef std::unique_ptr<uint8_t> ats_uint8_t_unique_ptr;
-
 struct QUICPacketHandler;
 class QUICLossDetector;
 
@@ -142,7 +140,7 @@ class SSLNextProtocolSet;
  **/
 class QUICNetVConnection : public UnixNetVConnection, public QUICConnection
 {
-  typedef UnixNetVConnection super; ///< Parent type.
+  using super = UnixNetVConnection; ///< Parent type.
 
 public:
   QUICNetVConnection();
@@ -235,6 +233,4 @@ private:
   QUICApplication *_create_application();
 };
 
-typedef int (QUICNetVConnection::*QUICNetVConnHandler)(int, void *);
-
 extern ClassAllocator<QUICNetVConnection> quicNetVCAllocator;
diff --git a/iocore/net/quic/QUICFrame.h b/iocore/net/quic/QUICFrame.h
index 79e21b4..8feb175 100644
--- a/iocore/net/quic/QUICFrame.h
+++ b/iocore/net/quic/QUICFrame.h
@@ -428,7 +428,7 @@ private:
   QUICConnectionId _connection_id = 0;
 };
 
-typedef void (*QUICFrameDeleterFunc)(QUICFrame *p);
+using QUICFrameDeleterFunc = void (*)(QUICFrame *p);
 
 //
 // Retransmission Frame
diff --git a/iocore/net/quic/QUICTypes.h b/iocore/net/quic/QUICTypes.h
index aabf1d9..e709ddc 100644
--- a/iocore/net/quic/QUICTypes.h
+++ b/iocore/net/quic/QUICTypes.h
@@ -48,10 +48,10 @@
 using ats_unique_buf = std::unique_ptr<uint8_t, decltype(&ats_free)>;
 ats_unique_buf ats_unique_malloc(size_t size);
 
-typedef uint64_t QUICPacketNumber;
-typedef uint32_t QUICVersion;
-typedef uint32_t QUICStreamId;
-typedef uint64_t QUICOffset;
+using QUICPacketNumber = uint64_t;
+using QUICVersion      = uint32_t;
+using QUICStreamId     = uint32_t;
+using QUICOffset       = uint64_t;
 
 // TODO: Update version number
 // Note: You also need to update tests for VersionNegotiationPacket, if you 
change the number of versions

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>'].

Reply via email to