This is an automated email from the ASF dual-hosted git repository.
wkaras pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 6de704ec95 Remove unused MIOBuffer constructor, add explicit to
another. (#11613)
6de704ec95 is described below
commit 6de704ec955204784108e2d9a3c14c0e20f2f4a8
Author: Walt Karas <[email protected]>
AuthorDate: Thu Jul 25 16:22:36 2024 -0400
Remove unused MIOBuffer constructor, add explicit to another. (#11613)
---
include/iocore/eventsystem/IOBuffer.h | 4 +---
include/proxy/http2/Http2Stream.h | 2 +-
include/proxy/http3/Http3Transaction.h | 2 +-
src/iocore/eventsystem/P_IOBuffer.h | 22 ----------------------
4 files changed, 3 insertions(+), 27 deletions(-)
diff --git a/include/iocore/eventsystem/IOBuffer.h
b/include/iocore/eventsystem/IOBuffer.h
index c0d38d325d..9b2ffc1dd8 100644
--- a/include/iocore/eventsystem/IOBuffer.h
+++ b/include/iocore/eventsystem/IOBuffer.h
@@ -1236,9 +1236,7 @@ public:
const char *_location = nullptr;
- MIOBuffer(void *b, int64_t bufsize, int64_t aWater_mark);
- // cppcheck-suppress noExplicitConstructor; allow implicit conversion
- MIOBuffer(int64_t default_size_index);
+ explicit MIOBuffer(int64_t default_size_index);
MIOBuffer();
~MIOBuffer();
};
diff --git a/include/proxy/http2/Http2Stream.h
b/include/proxy/http2/Http2Stream.h
index 26b93e4041..4c665b22f6 100644
--- a/include/proxy/http2/Http2Stream.h
+++ b/include/proxy/http2/Http2Stream.h
@@ -210,7 +210,7 @@ private:
int64_t _http_sm_id = -1;
HTTPHdr _receive_header;
- MIOBuffer _receive_buffer = BUFFER_SIZE_INDEX_4K;
+ MIOBuffer _receive_buffer{BUFFER_SIZE_INDEX_4K};
VIO read_vio;
VIO write_vio;
diff --git a/include/proxy/http3/Http3Transaction.h
b/include/proxy/http3/Http3Transaction.h
index 4389d5eab3..1b0eb48806 100644
--- a/include/proxy/http3/Http3Transaction.h
+++ b/include/proxy/http3/Http3Transaction.h
@@ -94,7 +94,7 @@ protected:
EThread *_thread = nullptr;
- MIOBuffer _read_vio_buf = BUFFER_SIZE_INDEX_4K;
+ MIOBuffer _read_vio_buf{BUFFER_SIZE_INDEX_4K};
QUICStreamVCAdapter::IOInfo &_info;
size_t _sent_bytes = 0;
diff --git a/src/iocore/eventsystem/P_IOBuffer.h
b/src/iocore/eventsystem/P_IOBuffer.h
index b6fd9eeee9..7be6569d75 100644
--- a/src/iocore/eventsystem/P_IOBuffer.h
+++ b/src/iocore/eventsystem/P_IOBuffer.h
@@ -617,28 +617,6 @@ IOBufferReader::reset()
//
////////////////////////////////////////////////////////////////
extern ClassAllocator<MIOBuffer> ioAllocator;
-////////////////////////////////////////////////////////////////
-//
-// MIOBuffer::MIOBuffer()
-//
-// This constructor accepts a pre-allocated memory buffer,
-// wraps if in a IOBufferData and IOBufferBlock structures
-// and sets it as the current block.
-// NOTE that in this case the memory buffer will not be freed
-// by the MIOBuffer class. It is the user responsibility to
-// free the memory buffer. The wrappers (MIOBufferBlock and
-// MIOBufferData) will be freed by this class.
-//
-////////////////////////////////////////////////////////////////
-TS_INLINE
-MIOBuffer::MIOBuffer(void *b, int64_t bufsize, int64_t aWater_mark)
-{
- _location = nullptr;
- set(b, bufsize);
- water_mark = aWater_mark;
- size_index = BUFFER_SIZE_NOT_ALLOCATED;
- return;
-}
TS_INLINE
MIOBuffer::MIOBuffer(int64_t default_size_index)