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 | 19bd45eb7775ffded0c62ab05d10b7326198aaa6 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library | |
parent | 5062bdf2c2bf1b46701280e5dc5ed6d1f7bd4e3e (diff) | |
download | ydb-19bd45eb7775ffded0c62ab05d10b7326198aaa6.tar.gz |
Restoring authorship annotation for <zdm@yandex-team.ru>. Commit 2 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 c7e46e7127..412424889f 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 dd8018838f..2a9e36fe68 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 ae8a132789..128583bdd7 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 ba7f720fe1..05c954384a 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 03a8b6ed7c..38eda0e5e7 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; |