diff options
author | zdm <zdm@yandex-team.ru> | 2022-02-10 16:49:24 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:24 +0300 |
commit | 5062bdf2c2bf1b46701280e5dc5ed6d1f7bd4e3e (patch) | |
tree | 71dea1966d70ae4fc7b31cccf3a492f6efc621f7 /library | |
parent | 2ab6bab688484680d3ebc5c4a7e9cd3ff04fda04 (diff) | |
download | ydb-5062bdf2c2bf1b46701280e5dc5ed6d1f7bd4e3e.tar.gz |
Restoring authorship annotation for <zdm@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library')
-rw-r--r-- | library/cpp/binsaver/bin_saver.h | 10 | ||||
-rw-r--r-- | library/cpp/binsaver/mem_io.h | 2 | ||||
-rw-r--r-- | library/cpp/http/server/http.cpp | 4 | ||||
-rw-r--r-- | library/cpp/http/server/options.cpp | 26 | ||||
-rw-r--r-- | library/cpp/http/server/options.h | 20 |
5 files changed, 31 insertions, 31 deletions
diff --git a/library/cpp/binsaver/bin_saver.h b/library/cpp/binsaver/bin_saver.h index 412424889f..c7e46e7127 100644 --- a/library/cpp/binsaver/bin_saver.h +++ b/library/cpp/binsaver/bin_saver.h @@ -164,12 +164,12 @@ private: TStoredSize nSize; Add(3, &nSize); TVector<typename AMM::key_type, typename std::allocator_traits<typename AMM::allocator_type>::template rebind_alloc<typename AMM::key_type>> indices; - indices.resize(nSize); + indices.resize(nSize); for (TStoredSize i = 0; i < nSize; ++i) - Add(1, &indices[i]); + Add(1, &indices[i]); for (TStoredSize i = 0; i < nSize; ++i) { std::pair<typename AMM::key_type, typename AMM::mapped_type> valToInsert; - valToInsert.first = indices[i]; + valToInsert.first = indices[i]; Add(2, &valToInsert.second); data.insert(valToInsert); } @@ -391,7 +391,7 @@ public: } int i = 1; for (typename TList<T1>::iterator k = data.begin(); k != data.end(); ++k, ++i) - Add(i + 2, &(*k)); + Add(i + 2, &(*k)); return 0; } template <class T1, class T2> @@ -400,7 +400,7 @@ public: Add(2, &(pData->second)); return 0; } - + template <class T1, size_t N> int Add(const chunk_id, std::array<T1, N>* pData) { if (HasNonTrivialSerializer<T1>(0u)) { diff --git a/library/cpp/binsaver/mem_io.h b/library/cpp/binsaver/mem_io.h index 2a9e36fe68..dd8018838f 100644 --- a/library/cpp/binsaver/mem_io.h +++ b/library/cpp/binsaver/mem_io.h @@ -1,7 +1,7 @@ #pragma once #include "bin_saver.h" - + namespace NMemIoInternals { class TMemoryStream: public IBinaryStream { TVector<char>& Data; diff --git a/library/cpp/http/server/http.cpp b/library/cpp/http/server/http.cpp index 128583bdd7..ae8a132789 100644 --- a/library/cpp/http/server/http.cpp +++ b/library/cpp/http/server/http.cpp @@ -26,8 +26,8 @@ #include <sys/stat.h> #include <sys/types.h> -using namespace NAddr; - +using namespace NAddr; + namespace { class IPollAble { public: diff --git a/library/cpp/http/server/options.cpp b/library/cpp/http/server/options.cpp index 05c954384a..ba7f720fe1 100644 --- a/library/cpp/http/server/options.cpp +++ b/library/cpp/http/server/options.cpp @@ -1,6 +1,6 @@ #include "options.h" -#include <util/string/cast.h> +#include <util/string/cast.h> #include <util/digest/numeric.h> #include <util/network/ip.h> #include <util/network/socket.h> @@ -8,32 +8,32 @@ #include <util/generic/yexception.h> using TAddr = THttpServerOptions::TAddr; - + static inline TString AddrToString(const TAddr& addr) { - return addr.Addr + ":" + ToString(addr.Port); -} - + return addr.Addr + ":" + ToString(addr.Port); +} + static inline TNetworkAddress ToNetworkAddr(const TString& address, ui16 port) { if (address.empty() || address == TStringBuf("*")) { - return TNetworkAddress(port); + return TNetworkAddress(port); } - return TNetworkAddress(address, port); + return TNetworkAddress(address, port); } void THttpServerOptions::BindAddresses(TBindAddresses& ret) const { THashSet<TString> check; for (auto addr : BindSockaddr) { - if (!addr.Port) { - addr.Port = Port; + if (!addr.Port) { + addr.Port = Port; } const TString straddr = AddrToString(addr); - - if (check.find(straddr) == check.end()) { - check.insert(straddr); - ret.push_back(ToNetworkAddr(addr.Addr, addr.Port)); + + if (check.find(straddr) == check.end()) { + check.insert(straddr); + ret.push_back(ToNetworkAddr(addr.Addr, addr.Port)); } } diff --git a/library/cpp/http/server/options.h b/library/cpp/http/server/options.h index 38eda0e5e7..03a8b6ed7c 100644 --- a/library/cpp/http/server/options.h +++ b/library/cpp/http/server/options.h @@ -2,7 +2,7 @@ #include <util/network/ip.h> #include <util/network/init.h> -#include <util/network/address.h> +#include <util/network/address.h> #include <util/generic/size_literals.h> #include <util/generic/string.h> #include <util/generic/vector.h> @@ -19,15 +19,15 @@ public: void BindAddresses(TBindAddresses& ret) const; inline THttpServerOptions& AddBindAddress(const TString& address, ui16 port) { - const TAddr addr = { + const TAddr addr = { address, port, }; - BindSockaddr.push_back(addr); + BindSockaddr.push_back(addr); return *this; - } - + } + inline THttpServerOptions& AddBindAddress(const TString& address) { return AddBindAddress(address, 0); } @@ -139,13 +139,13 @@ public: return *this; } - struct TAddr { + struct TAddr { TString Addr; - ui16 Port; - }; - + ui16 Port; + }; + typedef TVector<TAddr> TAddrs; - + bool KeepAliveEnabled = true; bool CompressionEnabled = false; bool RejectExcessConnections = false; |