aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/ipv6_address
diff options
context:
space:
mode:
authorlapshov <lapshov@yandex-team.ru>2022-02-10 16:49:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:39 +0300
commit4f36f44b1e216dca1f44ada8d126e7b70f05da2f (patch)
treeedbdb67ebe4b9195bf7c53bbc0a963fc03ccc17e /library/cpp/ipv6_address
parent8b71ce88bea710a9663bb143e4916f961c57212e (diff)
downloadydb-4f36f44b1e216dca1f44ada8d126e7b70f05da2f.tar.gz
Restoring authorship annotation for <lapshov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/ipv6_address')
-rw-r--r--library/cpp/ipv6_address/ipv6_address.cpp8
-rw-r--r--library/cpp/ipv6_address/ipv6_address.h16
2 files changed, 12 insertions, 12 deletions
diff --git a/library/cpp/ipv6_address/ipv6_address.cpp b/library/cpp/ipv6_address/ipv6_address.cpp
index be8fcbae13..48c9e8c860 100644
--- a/library/cpp/ipv6_address/ipv6_address.cpp
+++ b/library/cpp/ipv6_address/ipv6_address.cpp
@@ -122,17 +122,17 @@ TString TIpv6Address::ToString(bool PrintScopeId, bool* ok) const noexcept {
in_addr addr;
ToInAddr(addr);
isOk = inet_ntop(AF_INET, &addr, result.begin(), INET_ADDRSTRLEN);
- result.resize(result.find('\0'));
+ result.resize(result.find('\0'));
} else if (Type_ == TIpv6Address::Ipv6) {
result.resize(INET6_ADDRSTRLEN + 2);
in6_addr addr;
ToIn6Addr(addr);
isOk = inet_ntop(AF_INET6, &addr, result.begin(), INET6_ADDRSTRLEN);
- result.resize(result.find('\0'));
+ result.resize(result.find('\0'));
if (PrintScopeId)
result += "%" + ::ToString(ScopeId_);
- } else {
- result = "null";
+ } else {
+ result = "null";
isOk = true;
}
diff --git a/library/cpp/ipv6_address/ipv6_address.h b/library/cpp/ipv6_address/ipv6_address.h
index 1d7eb0b65f..6b1b106dfe 100644
--- a/library/cpp/ipv6_address/ipv6_address.h
+++ b/library/cpp/ipv6_address/ipv6_address.h
@@ -97,21 +97,21 @@ public:
constexpr bool operator<(const TIpv6Address& other) const noexcept {
if (Type_ != other.Type_)
- return Type_ > other.Type_;
- else
- return Ip < other.Ip;
+ return Type_ > other.Type_;
+ else
+ return Ip < other.Ip;
}
constexpr bool operator>(const TIpv6Address& other) const noexcept {
if (Type_ != other.Type_)
- return Type_ < other.Type_;
- else
- return Ip > other.Ip;
+ return Type_ < other.Type_;
+ else
+ return Ip > other.Ip;
}
constexpr bool operator==(const TIpv6Address& other) const noexcept {
- return Type_ == other.Type_ && Ip == other.Ip;
+ return Type_ == other.Type_ && Ip == other.Ip;
}
constexpr bool operator!=(const TIpv6Address& other) const noexcept {
- return Type_ != other.Type_ || Ip != other.Ip;
+ return Type_ != other.Type_ || Ip != other.Ip;
}
constexpr bool operator<=(const TIpv6Address& other) const noexcept {