fix: Silence false positive cppcoreguidel-pro-bounds-array-to-pointer-decay

This commit is contained in:
Dennis Klein 2021-10-12 17:51:28 +02:00 committed by Alexey Rybalchenko
parent 5fe2f53c7b
commit 1a5d0eddbe

View File

@ -87,7 +87,11 @@ class Channel
struct ChannelConfigurationError : std::runtime_error { using std::runtime_error::runtime_error; }; struct ChannelConfigurationError : std::runtime_error { using std::runtime_error::runtime_error; };
Socket& GetSocket() const { assert(fSocket); return *fSocket; } Socket& GetSocket() const
{
assert(fSocket); // NOLINT(cppcoreguidelines-pro-bounds-array-to-pointer-decay)
return *fSocket;
}
bool Bind(const std::string& address) bool Bind(const std::string& address)
{ {