diff options
author | Ed Tanous <ed@tanous.net> | 2024-03-25 21:20:18 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2024-03-28 00:46:58 +0300 |
commit | a93163aa22c5c965d7f4af4bd7c1a19ecfb304cc (patch) | |
tree | 6a42e1cf3c2835d31723e59f3044b45b06bbc1e8 /http/nghttp2_adapters.hpp | |
parent | 5a785c8a65e91f5c77e68bb72269f58c1d07b683 (diff) | |
download | bmcweb-a93163aa22c5c965d7f4af4bd7c1a19ecfb304cc.tar.xz |
Rename http2 unpacker
These classes accidentally overlapped in naming with the nghttp2
classes. This is because this class, unlike most nghttp2 classes
doesn't end in _ptr for a type. This changes the class name to add a
_ex to differentiate the two classes, and avoid a warning in clang.
Tested: Unit tests pass. Code only used in unit test.
Change-Id: I91a6982264df69bc65166ab38feddc21f72cd223
Signed-off-by: Ed Tanous <ed@tanous.net>
Diffstat (limited to 'http/nghttp2_adapters.hpp')
-rw-r--r-- | http/nghttp2_adapters.hpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/http/nghttp2_adapters.hpp b/http/nghttp2_adapters.hpp index 3235372157..df230fee7c 100644 --- a/http/nghttp2_adapters.hpp +++ b/http/nghttp2_adapters.hpp @@ -11,7 +11,12 @@ extern "C" /* This file contains RAII compatible adapters for nghttp2 structures. They * attempt to be as close to a direct call as possible, while keeping the RAII - * lifetime safety for the various classes.*/ + * lifetime safety for the various classes. Because of this, they use the same + * naming as nghttp2, so ignore naming violations. + */ + +// NOLINTBEGIN(readability-identifier-naming, +// readability-make-member-function-const) struct nghttp2_session; @@ -160,12 +165,12 @@ struct nghttp2_session nghttp2_session* ptr = nullptr; }; -class nghttp2_hd_inflater +struct nghttp2_hd_inflater_ex { nghttp2_hd_inflater* ptr = nullptr; public: - nghttp2_hd_inflater() + nghttp2_hd_inflater_ex() { if (nghttp2_hd_inflate_new(&ptr) != 0) { @@ -185,12 +190,12 @@ class nghttp2_hd_inflater return nghttp2_hd_inflate_end_headers(ptr); } - nghttp2_hd_inflater(const nghttp2_hd_inflater&) = delete; - nghttp2_hd_inflater& operator=(const nghttp2_hd_inflater&) = delete; - nghttp2_hd_inflater& operator=(nghttp2_hd_inflater&&) = delete; - nghttp2_hd_inflater(nghttp2_hd_inflater&& other) = delete; + nghttp2_hd_inflater_ex(const nghttp2_hd_inflater_ex&) = delete; + nghttp2_hd_inflater_ex& operator=(const nghttp2_hd_inflater_ex&) = delete; + nghttp2_hd_inflater_ex& operator=(nghttp2_hd_inflater_ex&&) = delete; + nghttp2_hd_inflater_ex(nghttp2_hd_inflater_ex&& other) = delete; - ~nghttp2_hd_inflater() + ~nghttp2_hd_inflater_ex() { if (ptr != nullptr) { @@ -198,3 +203,5 @@ class nghttp2_hd_inflater } } }; +// NOLINTEND(readability-identifier-naming, +// readability-make-member-function-const) |