diff options
author | yuryalekseev <yuryalekseev@yandex-team.com> | 2024-06-03 11:36:20 +0300 |
---|---|---|
committer | yuryalekseev <yuryalekseev@yandex-team.com> | 2024-06-03 11:49:14 +0300 |
commit | 1c27e56fbc9b24265828ebcfb7cb011aeb1a438b (patch) | |
tree | 27641eedc97023c7131e06c25a232adba31cc8df | |
parent | 28ff234f758e7fd2f42f229a4b55ff70506f0015 (diff) | |
download | ydb-1c27e56fbc9b24265828ebcfb7cb011aeb1a438b.tar.gz |
YT-21684: Address review comments.
1e4862196f95370b4403c48a76688489e6b593c7
-rw-r--r-- | yt/yt/core/net/address.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/yt/yt/core/net/address.cpp b/yt/yt/core/net/address.cpp index 460b503292..2f05fe40df 100644 --- a/yt/yt/core/net/address.cpp +++ b/yt/yt/core/net/address.cpp @@ -803,6 +803,8 @@ void Serialize(const TIP6Address& value, IYsonConsumer* consumer) //////////////////////////////////////////////////////////////////////////////// +namespace { + int GetMaskSize(const TIP6Address& mask) { int size = 0; @@ -813,6 +815,8 @@ int GetMaskSize(const TIP6Address& mask) return size; } +} // namespace + TIP6Network::TIP6Network(const TIP6Address& network, const TIP6Address& mask) : Network_(network) , Mask_(mask) @@ -827,7 +831,7 @@ TIP6Network::TIP6Network(const TIP6Address& network, const TIP6Address& mask) seenOne = true; } else { if (seenOne) { - THROW_ERROR_EXCEPTION("Invalid network mask %Qv", ToString(mask)); + THROW_ERROR_EXCEPTION("Invalid network mask %Qv", mask); } } } @@ -913,8 +917,7 @@ bool TIP6Network::FromString(TStringBuf str, TIP6Network* network) void FormatValue(TStringBuilderBase* builder, const TIP6Network& network, TStringBuf /*spec*/) { - auto projectId = network.GetProjectId(); - if (projectId) { + if (auto projectId = network.GetProjectId()) { // The network has been created from string in // project id notation. Save it just the way it came. |