aboutsummaryrefslogtreecommitdiffstats
path: root/yt
diff options
context:
space:
mode:
authorsabdenovch <sabdenovch@yandex-team.com>2023-08-28 18:11:46 +0300
committersabdenovch <sabdenovch@yandex-team.com>2023-08-28 18:41:07 +0300
commit4d9954dde66b7a3383ca8cfa5540bf5bfbb19c54 (patch)
tree89f57348d604223af4893039750d898fd5a8d04e /yt
parent62ef0aa2df21d7c3b1ef231053664f2c81dd2515 (diff)
downloadydb-4d9954dde66b7a3383ca8cfa5540bf5bfbb19c54.tar.gz
Removed the last typedefs in the codebase
removed a lot of typedefs and turned a couple of std::pairs into something more meaningful
Diffstat (limited to 'yt')
-rw-r--r--yt/yt/client/driver/driver.cpp4
-rw-r--r--yt/yt/client/table_client/pipe.h8
-rw-r--r--yt/yt/client/unittests/yamred_dsv_writer_ut.cpp2
-rw-r--r--yt/yt/core/actions/callback.h6
-rw-r--r--yt/yt/core/actions/callback_internal.h2
-rw-r--r--yt/yt/core/actions/public.h2
-rw-r--r--yt/yt/core/actions/signal.h2
-rw-r--r--yt/yt/core/concurrency/delayed_executor.h2
-rw-r--r--yt/yt/core/crypto/crypto.h6
-rw-r--r--yt/yt/core/http/unittests/http_ut.cpp4
-rw-r--r--yt/yt/core/misc/serialize-inl.h4
-rw-r--r--yt/yt/core/net/unittests/network_address_ut.cpp2
-rw-r--r--yt/yt/core/rpc/serialized_channel.cpp4
-rw-r--r--yt/yt/core/yson/detail.h2
-rw-r--r--yt/yt/core/yson/lexer_detail.h2
-rw-r--r--yt/yt/core/yson/parser.cpp2
-rw-r--r--yt/yt/core/yson/parser_detail.h12
-rw-r--r--yt/yt/core/ytree/fluent.h36
-rw-r--r--yt/yt/core/ytree/helpers.h2
-rw-r--r--yt/yt/core/ytree/node.h2
-rw-r--r--yt/yt/core/ytree/public.h4
-rw-r--r--yt/yt/core/ytree/tree_visitor.cpp2
-rw-r--r--yt/yt/core/ytree/unittests/yson_serializable_ut.cpp4
-rw-r--r--yt/yt/core/ytree/unittests/yson_struct_ut.cpp4
-rw-r--r--yt/yt/core/ytree/unittests/ytree_fluent_ut.cpp11
-rw-r--r--yt/yt/core/ytree/ypath_client-inl.h2
-rw-r--r--yt/yt/core/ytree/ypath_client.h12
-rw-r--r--yt/yt/core/ytree/yson_serializable.h12
-rw-r--r--yt/yt/core/ytree/yson_struct.h2
-rw-r--r--yt/yt/library/profiling/solomon/cube.h2
-rw-r--r--yt/yt/library/ytprof/api/api.h2
-rw-r--r--yt/yt/library/ytprof/heap_profiler.h2
32 files changed, 81 insertions, 84 deletions
diff --git a/yt/yt/client/driver/driver.cpp b/yt/yt/client/driver/driver.cpp
index 58e7749cee..be39258e1a 100644
--- a/yt/yt/client/driver/driver.cpp
+++ b/yt/yt/client/driver/driver.cpp
@@ -471,8 +471,8 @@ private:
IProxyDiscoveryCachePtr ProxyDiscoveryCache_;
class TCommandContext;
- typedef TIntrusivePtr<TCommandContext> TCommandContextPtr;
- typedef TCallback<void(ICommandContextPtr)> TExecuteCallback;
+ using TCommandContextPtr = TIntrusivePtr<TCommandContext>;
+ using TExecuteCallback = TCallback<void(ICommandContextPtr)>;
const IStickyTransactionPoolPtr StickyTransactionPool_;
diff --git a/yt/yt/client/table_client/pipe.h b/yt/yt/client/table_client/pipe.h
index 2c9ac00bf6..ce543e3fda 100644
--- a/yt/yt/client/table_client/pipe.h
+++ b/yt/yt/client/table_client/pipe.h
@@ -29,16 +29,16 @@ public:
private:
class TImpl;
- typedef TIntrusivePtr<TImpl> TImplPtr;
+ using TImplPtr = TIntrusivePtr<TImpl>;
struct TData;
- typedef TIntrusivePtr<TData> TDataPtr;
+ using TDataPtr = TIntrusivePtr<TData>;
class TReader;
- typedef TIntrusivePtr<TReader> TReaderPtr;
+ using TReaderPtr = TIntrusivePtr<TReader>;
class TWriter;
- typedef TIntrusivePtr<TWriter> TWriterPtr;
+ using TWriterPtr = TIntrusivePtr<TWriter>;
TIntrusivePtr<TImpl> Impl_;
diff --git a/yt/yt/client/unittests/yamred_dsv_writer_ut.cpp b/yt/yt/client/unittests/yamred_dsv_writer_ut.cpp
index 3537702fe1..a45a895892 100644
--- a/yt/yt/client/unittests/yamred_dsv_writer_ut.cpp
+++ b/yt/yt/client/unittests/yamred_dsv_writer_ut.cpp
@@ -15,7 +15,7 @@
namespace NYT::NFormats {
namespace {
-typedef TVector<TString> VectorStrok;
+using VectorStrok = TVector<TString>;
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/actions/callback.h b/yt/yt/core/actions/callback.h
index 762a2c278a..4d0ed22457 100644
--- a/yt/yt/core/actions/callback.h
+++ b/yt/yt/core/actions/callback.h
@@ -176,10 +176,10 @@ private:
// at the right registers.
//
// Kudos to folly::Function authors.
- typedef R(*TTypedInvokeFunction)(TCallArg<TArgs>..., NYT::NDetail::TBindStateBase*);
+ using TTypedInvokeFunction = R(*)(TCallArg<TArgs>..., NYT::NDetail::TBindStateBase*);
public:
- typedef R(TSignature)(TArgs...);
+ using TSignature = R(TArgs...);
TCallback()
: TCallbackBase(TIntrusivePtr<NYT::NDetail::TBindStateBase>())
@@ -243,7 +243,7 @@ private:
template <class R2, class... TArgs2>
TCallback<R2(TArgs2...)> CastImpl() const
{
- typedef TCallableBindState<R(TArgs...), R2(TArgs2...)> TBindState;
+ using TBindState = TCallableBindState<R(TArgs...), R2(TArgs2...)>;
return TCallback<R2(TArgs2...)>(
New<TBindState>(
diff --git a/yt/yt/core/actions/callback_internal.h b/yt/yt/core/actions/callback_internal.h
index ee9583450f..7eab2be430 100644
--- a/yt/yt/core/actions/callback_internal.h
+++ b/yt/yt/core/actions/callback_internal.h
@@ -96,7 +96,7 @@ protected:
* We create a TUntypedInvokeFunction type that can store our
* function pointer, and then cast it back to the original type on usage.
*/
- typedef void(*TUntypedInvokeFunction)();
+ using TUntypedInvokeFunction = void(*)();
TIntrusivePtr<TBindStateBase> BindState;
TUntypedInvokeFunction UntypedInvoke;
diff --git a/yt/yt/core/actions/public.h b/yt/yt/core/actions/public.h
index 55b180d488..803946a85b 100644
--- a/yt/yt/core/actions/public.h
+++ b/yt/yt/core/actions/public.h
@@ -9,7 +9,7 @@ namespace NYT {
template <class TSignature>
class TCallback;
-typedef TCallback<void()> TClosure;
+using TClosure = TCallback<void()>;
template <class TSignature>
class TCallbackList;
diff --git a/yt/yt/core/actions/signal.h b/yt/yt/core/actions/signal.h
index bceefacb55..4a254dab83 100644
--- a/yt/yt/core/actions/signal.h
+++ b/yt/yt/core/actions/signal.h
@@ -25,7 +25,7 @@ template <class TResult, class... TArgs>
class TCallbackList<TResult(TArgs...)>
{
public:
- typedef NYT::TCallback<TResult(TArgs...)> TCallback;
+ using TCallback = NYT::TCallback<TResult(TArgs...)>;
//! Adds a new handler to the list.
/*!
diff --git a/yt/yt/core/concurrency/delayed_executor.h b/yt/yt/core/concurrency/delayed_executor.h
index a2762d797f..54ee9d23e2 100644
--- a/yt/yt/core/concurrency/delayed_executor.h
+++ b/yt/yt/core/concurrency/delayed_executor.h
@@ -12,7 +12,7 @@ namespace NYT::NConcurrency {
class TDelayedExecutor
{
public:
- typedef TCallback<void(bool)> TDelayedCallback;
+ using TDelayedCallback = TCallback<void(bool)>;
//! Constructs a future that gets set when a given #delay elapses.
/*!
diff --git a/yt/yt/core/crypto/crypto.h b/yt/yt/core/crypto/crypto.h
index 5ed38394aa..e5a9217730 100644
--- a/yt/yt/core/crypto/crypto.h
+++ b/yt/yt/core/crypto/crypto.h
@@ -13,8 +13,8 @@ namespace NYT::NCrypto {
////////////////////////////////////////////////////////////////////////////////
-typedef std::array<char, 16> TMD5Hash;
-typedef std::array<char, 92> TMD5State;
+using TMD5Hash = std::array<char, 16>;
+using TMD5State = std::array<char, 92>;
TMD5Hash MD5FromString(TStringBuf data);
@@ -47,7 +47,7 @@ TString GetMD5HexDigestLowerCase(TStringBuf data);
////////////////////////////////////////////////////////////////////////////////
-typedef std::array<char, 20> TSha1Hash;
+using TSha1Hash = std::array<char, 20>;
TSha1Hash Sha1FromString(TStringBuf data);
diff --git a/yt/yt/core/http/unittests/http_ut.cpp b/yt/yt/core/http/unittests/http_ut.cpp
index 13dd7dbdcf..bb2c4e458e 100644
--- a/yt/yt/core/http/unittests/http_ut.cpp
+++ b/yt/yt/core/http/unittests/http_ut.cpp
@@ -278,7 +278,7 @@ void WriteBody(THttpOutput* out, TStringBuf body)
TEST(THttpOutputTest, Full)
{
- typedef std::tuple<EMessageType, TString, std::function<void(THttpOutput*)>> TTestCase;
+ using TTestCase = std::tuple<EMessageType, TString, std::function<void(THttpOutput*)>>;
std::vector<TTestCase> table = {
TTestCase{
EMessageType::Request,
@@ -468,7 +468,7 @@ void ExpectBodyEnd(THttpInput* in)
TEST(THttpInputTest, Simple)
{
- typedef std::tuple<EMessageType, TString, std::function<void(THttpInput*)>> TTestCase;
+ using TTestCase = std::tuple<EMessageType, TString, std::function<void(THttpInput*)>>;
std::vector<TTestCase> table = {
TTestCase{
EMessageType::Response,
diff --git a/yt/yt/core/misc/serialize-inl.h b/yt/yt/core/misc/serialize-inl.h
index 8183c34656..a3c985f4cc 100644
--- a/yt/yt/core/misc/serialize-inl.h
+++ b/yt/yt/core/misc/serialize-inl.h
@@ -1111,7 +1111,7 @@ struct TSorterSelector<THashSet<T...>, C, TSortedTag>
template <class C, class T, size_t N, class Q>
struct TSorterSelector<TCompactSet<T, N, Q>, C, TSortedTag>
{
- typedef TNoopSorter<TCompactSet<T, N, Q>, C> TSorter;
+ using TSorter = TNoopSorter<TCompactSet<T, N, Q>, C>;
};
template <class C, class... T>
@@ -1879,7 +1879,7 @@ struct TSerializerTraits<THashSet<T, H, E, A>, C, void>
template <class T, size_t N, class Q, class C>
struct TSerializerTraits<TCompactSet<T, N, Q>, C, void>
{
- typedef TSetSerializer<> TSerializer;
+ using TSerializer = TSetSerializer<>;
};
template <class T, class C>
diff --git a/yt/yt/core/net/unittests/network_address_ut.cpp b/yt/yt/core/net/unittests/network_address_ut.cpp
index 6d295fae96..d93fba8d88 100644
--- a/yt/yt/core/net/unittests/network_address_ut.cpp
+++ b/yt/yt/core/net/unittests/network_address_ut.cpp
@@ -170,7 +170,7 @@ std::array<ui16, 8> AddressToWords(const TIP6Address& addr) {
TEST(TIP6AddressTest, FromString)
{
- typedef std::pair<TString, std::array<ui16, 8>> TTestCase;
+ using TTestCase = std::pair<TString, std::array<ui16, 8>>;
for (const auto& testCase : {
TTestCase{"0:0:0:0:0:0:0:0", {0, 0, 0, 0, 0, 0, 0, 0}},
diff --git a/yt/yt/core/rpc/serialized_channel.cpp b/yt/yt/core/rpc/serialized_channel.cpp
index 19ddedb1d8..8722d79737 100644
--- a/yt/yt/core/rpc/serialized_channel.cpp
+++ b/yt/yt/core/rpc/serialized_channel.cpp
@@ -9,7 +9,7 @@ namespace NYT::NRpc {
////////////////////////////////////////////////////////////////////////////////
class TSerializedChannel;
-typedef TIntrusivePtr<TSerializedChannel> TSerializedChannelPtr;
+using TSerializedChannelPtr = TIntrusivePtr<TSerializedChannel>;
class TSerializedChannel
: public TChannelWrapper
@@ -118,7 +118,7 @@ private:
TClientRequestControlThunkPtr RequestControlThunk = New<TClientRequestControlThunk>();
};
- typedef TIntrusivePtr<TEntry> TEntryPtr;
+ using TEntryPtr = TIntrusivePtr<TEntry>;
YT_DECLARE_SPIN_LOCK(NThreading::TSpinLock, SpinLock_);
std::queue<TEntryPtr> Queue_;
diff --git a/yt/yt/core/yson/detail.h b/yt/yt/core/yson/detail.h
index 4d77ff85f7..352c45a958 100644
--- a/yt/yt/core/yson/detail.h
+++ b/yt/yt/core/yson/detail.h
@@ -536,7 +536,7 @@ class TLexerBase
: public TCodedStream<TCharStream<TBlockStream, TPositionInfo<EnableLinePositionInfo>>>
{
private:
- typedef TCodedStream<TCharStream<TBlockStream, TPositionInfo<EnableLinePositionInfo>>> TBaseStream;
+ using TBaseStream = TCodedStream<TCharStream<TBlockStream, TPositionInfo<EnableLinePositionInfo>>>;
const i64 MemoryLimit_;
diff --git a/yt/yt/core/yson/lexer_detail.h b/yt/yt/core/yson/lexer_detail.h
index 96c2967a89..d68ac52e88 100644
--- a/yt/yt/core/yson/lexer_detail.h
+++ b/yt/yt/core/yson/lexer_detail.h
@@ -50,7 +50,7 @@ class TLexer
: public TLexerBase<TBlockStream, EnableLinePositionInfo>
{
private:
- typedef TLexerBase<TBlockStream, EnableLinePositionInfo> TBase;
+ using TBase = TLexerBase<TBlockStream, EnableLinePositionInfo>;
static EReadStartCase GetStartState(char ch)
{
diff --git a/yt/yt/core/yson/parser.cpp b/yt/yt/core/yson/parser.cpp
index e04515cc10..b330538bbb 100644
--- a/yt/yt/core/yson/parser.cpp
+++ b/yt/yt/core/yson/parser.cpp
@@ -14,7 +14,7 @@ using namespace NConcurrency;
class TYsonParser::TImpl
{
private:
- typedef TCoroutine<int(const char* begin, const char* end, bool finish)> TParserCoroutine;
+ using TParserCoroutine = TCoroutine<int(const char* begin, const char* end, bool finish)>;
TParserCoroutine ParserCoroutine_;
TParserYsonStreamImpl<IYsonConsumer, TBlockReader<TParserCoroutine>> Parser_;
diff --git a/yt/yt/core/yson/parser_detail.h b/yt/yt/core/yson/parser_detail.h
index 6380193283..76a44296f7 100644
--- a/yt/yt/core/yson/parser_detail.h
+++ b/yt/yt/core/yson/parser_detail.h
@@ -22,7 +22,7 @@ class TParser
: public TLexerBase<TReaderWithContext<TBlockStream, MaxContextSize>, EnableLinePositionInfo>
{
private:
- typedef TLexerBase<TReaderWithContext<TBlockStream, MaxContextSize>, EnableLinePositionInfo> TBase;
+ using TBase = TLexerBase<TReaderWithContext<TBlockStream, MaxContextSize>, EnableLinePositionInfo>;
TConsumer* const Consumer_;
const int NestingLevelLimit_;
@@ -455,22 +455,22 @@ public:
const TYsonParserConfig& config)
{
if (config.EnableLinePositionInfo && config.EnableContext) {
- typedef NDetail::TParser<TConsumer, TBlockStream, 64, true> TImpl;
+ using TImpl = NDetail::TParser<TConsumer, TBlockStream, 64, true>;
TImpl impl(blockStream, consumer, config.MemoryLimit, config.NestingLevelLimit);
BlockStream_ = static_cast<TBlockStream*>(&impl);
impl.DoParse(parsingMode);
} else if (config.EnableLinePositionInfo && !config.EnableContext) {
- typedef NDetail::TParser<TConsumer, TBlockStream, 0, true> TImpl;
+ using TImpl = NDetail::TParser<TConsumer, TBlockStream, 0, true>;
TImpl impl(blockStream, consumer, config.MemoryLimit, config.NestingLevelLimit);
BlockStream_ = static_cast<TBlockStream*>(&impl);
impl.DoParse(parsingMode);
} else if (!config.EnableLinePositionInfo && config.EnableContext) {
- typedef NDetail::TParser<TConsumer, TBlockStream, 64, false> TImpl;
+ using TImpl = NDetail::TParser<TConsumer, TBlockStream, 64, false>;
TImpl impl(blockStream, consumer, config.MemoryLimit, config.NestingLevelLimit);
BlockStream_ = static_cast<TBlockStream*>(&impl);
impl.DoParse(parsingMode);
} else {
- typedef NDetail::TParser<TConsumer, TBlockStream, 0, false> TImpl;
+ using TImpl = NDetail::TParser<TConsumer, TBlockStream, 0, false>;
TImpl impl(blockStream, consumer, config.MemoryLimit, config.NestingLevelLimit);
BlockStream_ = static_cast<TBlockStream*>(&impl);
impl.DoParse(parsingMode);
@@ -501,7 +501,7 @@ class TStatelessYsonParserImpl
: public TStatelessYsonParserImplBase
{
private:
- typedef NDetail::TParser<TConsumer, TStringReader, MaxContextSize, EnableLinePositionInfo> TParser;
+ using TParser = NDetail::TParser<TConsumer, TStringReader, MaxContextSize, EnableLinePositionInfo>;
TParser Parser;
public:
diff --git a/yt/yt/core/ytree/fluent.h b/yt/yt/core/ytree/fluent.h
index 45ab6875ea..f423fb17f5 100644
--- a/yt/yt/core/ytree/fluent.h
+++ b/yt/yt/core/ytree/fluent.h
@@ -121,7 +121,7 @@ namespace NYT::NYTree {
template <class T>
struct TFluentYsonUnwrapper
{
- typedef T TUnwrapped;
+ using TUnwrapped = T;
static TUnwrapped Unwrap(T t)
{
@@ -137,7 +137,7 @@ struct TFluentYsonVoid
template <>
struct TFluentYsonUnwrapper<TFluentYsonVoid>
{
- typedef void TUnwrapped;
+ using TUnwrapped = void;
static TUnwrapped Unwrap(TFluentYsonVoid)
{ }
@@ -175,7 +175,7 @@ public:
class TFluentBase
{
public:
- typedef typename TFluentYsonUnwrapper<TParent>::TUnwrapped TUnwrappedParent;
+ using TUnwrappedParent = typename TFluentYsonUnwrapper<TParent>::TUnwrapped;
NYson::IYsonConsumer* GetConsumer() const
{
@@ -210,8 +210,8 @@ public:
: public TFluentBase<TParent>
{
public:
- typedef TThis<TParent> TDeepThis;
- typedef typename TFluentYsonUnwrapper<TParent>::TUnwrapped TUnwrappedParent;
+ using TDeepThis = TThis<TParent>;
+ using TUnwrappedParent = typename TFluentYsonUnwrapper<TParent>::TUnwrapped;
explicit TFluentFragmentBase(NYson::IYsonConsumer* consumer, TParent parent = TParent())
: TFluentBase<TParent>(consumer, std::move(parent))
@@ -253,7 +253,7 @@ public:
: public TFluentBase<TParent>
{
public:
- typedef typename TFluentYsonUnwrapper<TParent>::TUnwrapped TUnwrappedParent;
+ using TUnwrappedParent = typename TFluentYsonUnwrapper<TParent>::TUnwrapped;
TAnyBase(NYson::IYsonConsumer* consumer, TParent parent = TParent())
: TFluentBase<TParent>(consumer, std::move(parent))
@@ -381,7 +381,7 @@ public:
: public TAnyBase<TParent, TAnyWithoutAttributes<TFluentYsonVoid>>
{
public:
- typedef TAnyBase<TParent, TAnyWithoutAttributes<TFluentYsonVoid>> TBase;
+ using TBase = TAnyBase<TParent, TAnyWithoutAttributes<TFluentYsonVoid>>;
explicit TAnyWithoutAttributes(NYson::IYsonConsumer* consumer, TParent parent = TParent())
: TBase(consumer, std::move(parent))
@@ -393,7 +393,7 @@ public:
: public TAnyBase<TParent, TAny<TFluentYsonVoid>>
{
public:
- typedef TAnyBase<TParent, TAny<TFluentYsonVoid>> TBase;
+ using TBase = TAnyBase<TParent, TAny<TFluentYsonVoid>>;
explicit TAny(NYson::IYsonConsumer* consumer, TParent parent = TParent())
: TBase(consumer, std::move(parent))
@@ -413,8 +413,8 @@ public:
: public TFluentFragmentBase<TFluentAttributes, TParent, TFluentMap<TFluentYsonVoid>>
{
public:
- typedef TFluentAttributes<TParent> TThis;
- typedef typename TFluentYsonUnwrapper<TParent>::TUnwrapped TUnwrappedParent;
+ using TThis = TFluentAttributes<TParent>;
+ using TUnwrappedParent = typename TFluentYsonUnwrapper<TParent>::TUnwrapped;
explicit TFluentAttributes(NYson::IYsonConsumer* consumer, TParent parent = TParent())
: TFluentFragmentBase<TFluentYsonBuilder::TFluentAttributes, TParent, TFluentMap<TFluentYsonVoid>>(consumer, std::move(parent))
@@ -478,8 +478,8 @@ public:
: public TFluentFragmentBase<TFluentList, TParent, TFluentList<TFluentYsonVoid>>
{
public:
- typedef TFluentList<TParent> TThis;
- typedef typename TFluentYsonUnwrapper<TParent>::TUnwrapped TUnwrappedParent;
+ using TThis = TFluentList<TParent>;
+ using TUnwrappedParent = typename TFluentYsonUnwrapper<TParent>::TUnwrapped;
explicit TFluentList(NYson::IYsonConsumer* consumer, TParent parent = TParent())
: TFluentFragmentBase<TFluentYsonBuilder::TFluentList, TParent, TFluentList<TFluentYsonVoid>>(consumer, std::move(parent))
@@ -521,8 +521,8 @@ public:
: public TFluentFragmentBase<TFluentMap, TParent, TFluentMap<TFluentYsonVoid>>
{
public:
- typedef TFluentMap<TParent> TThis;
- typedef typename TFluentYsonUnwrapper<TParent>::TUnwrapped TUnwrappedParent;
+ using TThis = TFluentMap<TParent>;
+ using TUnwrappedParent = typename TFluentYsonUnwrapper<TParent>::TUnwrapped;
explicit TFluentMap(NYson::IYsonConsumer* consumer, TParent parent = TParent())
: TFluentFragmentBase<TFluentYsonBuilder::TFluentMap, TParent, TFluentMap<TFluentYsonVoid>>(consumer, std::move(parent))
@@ -642,7 +642,7 @@ class TFluentYsonWriterState
: public TRefCounted
{
public:
- typedef NYson::TYsonString TValue;
+ using TValue = NYson::TYsonString;
TFluentYsonWriterState(NYson::EYsonFormat format, NYson::EYsonType type)
: Writer(&Output, format, type, true /* enableRaw */)
@@ -672,7 +672,7 @@ class TFluentYsonBuilderState
: public TRefCounted
{
public:
- typedef INodePtr TValue;
+ using TValue = INodePtr;
explicit TFluentYsonBuilderState(INodeFactory* factory)
: Builder(CreateBuilderFromFactory(factory))
@@ -746,7 +746,7 @@ private:
template <class TState>
struct TFluentYsonUnwrapper<TFluentYsonHolder<TState>>
{
- typedef typename TState::TValue TUnwrapped;
+ using TUnwrapped = typename TState::TValue;
static TUnwrapped Unwrap(const TFluentYsonHolder<TState>& holder)
{
@@ -759,7 +759,7 @@ struct TFluentYsonUnwrapper<TFluentYsonHolder<TState>>
template <class TState, NYson::EYsonType type>
auto BuildYsonFluentlyWithState(TIntrusivePtr<TState> state)
{
- typedef typename TFluentType<type>::template TValue<TFluentYsonHolder<TState>> TReturnType;
+ using TReturnType = typename TFluentType<type>::template TValue<TFluentYsonHolder<TState>>;
return TReturnType(
state->GetConsumer(),
TFluentYsonHolder<TState>(state));
diff --git a/yt/yt/core/ytree/helpers.h b/yt/yt/core/ytree/helpers.h
index abb15fa2bb..76cb8d2677 100644
--- a/yt/yt/core/ytree/helpers.h
+++ b/yt/yt/core/ytree/helpers.h
@@ -65,7 +65,7 @@ namespace NYT {
template <class C>
struct TSerializerTraits<NYTree::IAttributeDictionaryPtr, C, void>
{
- typedef NYTree::TAttributeDictionarySerializer TSerializer;
+ using TSerializer = NYTree::TAttributeDictionarySerializer;
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/ytree/node.h b/yt/yt/core/ytree/node.h
index 178131586a..9baac8e99a 100644
--- a/yt/yt/core/ytree/node.h
+++ b/yt/yt/core/ytree/node.h
@@ -81,7 +81,7 @@ template <class T>
struct IScalarNode
: public virtual INode
{
- typedef T TValue;
+ using TValue = T;
//! Gets the value.
virtual typename NMpl::TCallTraits<TValue>::TType GetValue() const = 0;
diff --git a/yt/yt/core/ytree/public.h b/yt/yt/core/ytree/public.h
index 5f426e6b10..d895d7ca13 100644
--- a/yt/yt/core/ytree/public.h
+++ b/yt/yt/core/ytree/public.h
@@ -25,9 +25,9 @@ class TYsonSerializable;
struct IYsonStructMeta;
DECLARE_REFCOUNTED_STRUCT(INode)
-typedef TIntrusivePtr<const INode> IConstNodePtr;
+using IConstNodePtr = TIntrusivePtr<const INode>;
DECLARE_REFCOUNTED_STRUCT(ICompositeNode)
-typedef TIntrusivePtr<ICompositeNode> ICompositeNodePtr;
+using ICompositeNodePtr = TIntrusivePtr<ICompositeNode>;
DECLARE_REFCOUNTED_STRUCT(IStringNode)
DECLARE_REFCOUNTED_STRUCT(IInt64Node)
DECLARE_REFCOUNTED_STRUCT(IUint64Node)
diff --git a/yt/yt/core/ytree/tree_visitor.cpp b/yt/yt/core/ytree/tree_visitor.cpp
index 8146497257..781b118c3f 100644
--- a/yt/yt/core/ytree/tree_visitor.cpp
+++ b/yt/yt/core/ytree/tree_visitor.cpp
@@ -131,7 +131,7 @@ private:
Consumer->OnBeginMap();
auto children = node->GetChildren();
if (Stable_) {
- typedef std::pair<TString, INodePtr> TPair;
+ using TPair = std::pair<TString, INodePtr>;
std::sort(
children.begin(),
children.end(),
diff --git a/yt/yt/core/ytree/unittests/yson_serializable_ut.cpp b/yt/yt/core/ytree/unittests/yson_serializable_ut.cpp
index 934036ac91..12835350a3 100644
--- a/yt/yt/core/ytree/unittests/yson_serializable_ut.cpp
+++ b/yt/yt/core/ytree/unittests/yson_serializable_ut.cpp
@@ -46,7 +46,7 @@ struct TTestSubconfig
}
};
-typedef TIntrusivePtr<TTestSubconfig> TTestSubconfigPtr;
+using TTestSubconfigPtr = TIntrusivePtr<TTestSubconfig>;
////////////////////////////////////////////////////////////////////////////////
@@ -77,7 +77,7 @@ public:
}
};
-typedef TIntrusivePtr<TTestConfig> TTestConfigPtr;
+using TTestConfigPtr = TIntrusivePtr<TTestConfig>;
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/ytree/unittests/yson_struct_ut.cpp b/yt/yt/core/ytree/unittests/yson_struct_ut.cpp
index 0b8ebbe52d..7f3f33fd7e 100644
--- a/yt/yt/core/ytree/unittests/yson_struct_ut.cpp
+++ b/yt/yt/core/ytree/unittests/yson_struct_ut.cpp
@@ -59,7 +59,7 @@ struct TTestSubconfig
}
};
-typedef TIntrusivePtr<TTestSubconfig> TTestSubconfigPtr;
+using TTestSubconfigPtr = TIntrusivePtr<TTestSubconfig>;
////////////////////////////////////////////////////////////////////////////////
@@ -97,7 +97,7 @@ public:
}
};
-typedef TIntrusivePtr<TTestConfig> TTestConfigPtr;
+using TTestConfigPtr = TIntrusivePtr<TTestConfig>;
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/ytree/unittests/ytree_fluent_ut.cpp b/yt/yt/core/ytree/unittests/ytree_fluent_ut.cpp
index aeff8ccadc..51f43f0e07 100644
--- a/yt/yt/core/ytree/unittests/ytree_fluent_ut.cpp
+++ b/yt/yt/core/ytree/unittests/ytree_fluent_ut.cpp
@@ -39,7 +39,7 @@ TYPED_TEST_P(TYTreeFluentStringScalarTest, Ok)
.Value(passedScalar);
}
-typedef Types<const char*, TString> TYTreeFluentStringScalarTestTypes;
+using TYTreeFluentStringScalarTestTypes = Types<const char*, TString>;
REGISTER_TYPED_TEST_SUITE_P(TYTreeFluentStringScalarTest, Ok);
INSTANTIATE_TYPED_TEST_SUITE_P(
@@ -73,8 +73,7 @@ TYPED_TEST_P(TYTreeFluentIntScalarTest, Ok)
.Value(passedScalar);
}
-typedef Types<i8, i16, i32, i64>
- TYTreeFluentIntScalarTestTypes;
+using TYTreeFluentIntScalarTestTypes = Types<i8, i16, i32, i64>;
REGISTER_TYPED_TEST_SUITE_P(TYTreeFluentIntScalarTest, Ok);
INSTANTIATE_TYPED_TEST_SUITE_P(TypeParametrized, TYTreeFluentIntScalarTest,
TYTreeFluentIntScalarTestTypes
@@ -105,8 +104,7 @@ TYPED_TEST_P(TYTreeFluentUintScalarTest, Ok)
.Value(passedScalar);
}
-typedef Types<ui8, ui16, ui32, ui64>
- TYTreeFluentUintScalarTestTypes;
+using TYTreeFluentUintScalarTestTypes = Types<ui8, ui16, ui32, ui64>;
REGISTER_TYPED_TEST_SUITE_P(TYTreeFluentUintScalarTest, Ok);
INSTANTIATE_TYPED_TEST_SUITE_P(TypeParametrized, TYTreeFluentUintScalarTest,
TYTreeFluentUintScalarTestTypes
@@ -137,8 +135,7 @@ TYPED_TEST_P(TYTreeFluentFloatScalarTest, Ok)
.Value(passedScalar);
}
-typedef Types<float, double>
- TYTreeFluentFloatScalarTestTypes;
+using TYTreeFluentFloatScalarTestTypes = Types<float, double>;
REGISTER_TYPED_TEST_SUITE_P(TYTreeFluentFloatScalarTest, Ok);
INSTANTIATE_TYPED_TEST_SUITE_P(TypeParametrized, TYTreeFluentFloatScalarTest,
TYTreeFluentFloatScalarTestTypes
diff --git a/yt/yt/core/ytree/ypath_client-inl.h b/yt/yt/core/ytree/ypath_client-inl.h
index 771ef629cd..4022ba82d9 100644
--- a/yt/yt/core/ytree/ypath_client-inl.h
+++ b/yt/yt/core/ytree/ypath_client-inl.h
@@ -12,7 +12,7 @@ template <class TTypedRequest>
TFuture<TIntrusivePtr<typename TTypedRequest::TTypedResponse>>
ExecuteVerb(const IYPathServicePtr& service, const TIntrusivePtr<TTypedRequest>& request)
{
- typedef typename TTypedRequest::TTypedResponse TTypedResponse;
+ using TTypedResponse = typename TTypedRequest::TTypedResponse;
auto requestMessage = request->Serialize();
return ExecuteVerb(service, requestMessage)
diff --git a/yt/yt/core/ytree/ypath_client.h b/yt/yt/core/ytree/ypath_client.h
index 187e6c2a73..c01a469402 100644
--- a/yt/yt/core/ytree/ypath_client.h
+++ b/yt/yt/core/ytree/ypath_client.h
@@ -96,7 +96,7 @@ class TTypedYPathRequest
, public TRequestMessage
{
public:
- typedef TTypedYPathResponse<TRequestMessage, TResponseMessage> TTypedResponse;
+ using TTypedResponse = TTypedYPathResponse<TRequestMessage, TResponseMessage>;
explicit TTypedYPathRequest(const NRpc::NProto::TRequestHeader& header)
: TYPathRequest(header)
@@ -168,11 +168,11 @@ protected:
static_assert(true)
#define DEFINE_YPATH_PROXY_METHOD_IMPL(ns, method, isMutating) \
- typedef ::NYT::NYTree::TTypedYPathRequest<ns::TReq##method, ns::TRsp##method> TReq##method; \
- typedef ::NYT::NYTree::TTypedYPathResponse<ns::TReq##method, ns::TRsp##method> TRsp##method; \
- typedef ::NYT::TIntrusivePtr<TReq##method> TReq##method##Ptr; \
- typedef ::NYT::TIntrusivePtr<TRsp##method> TRsp##method##Ptr; \
- typedef ::NYT::TErrorOr<TRsp##method##Ptr> TErrorOrRsp##method##Ptr; \
+ using TReq##method = ::NYT::NYTree::TTypedYPathRequest<ns::TReq##method, ns::TRsp##method>; \
+ using TRsp##method = ::NYT::NYTree::TTypedYPathResponse<ns::TReq##method, ns::TRsp##method>; \
+ using TReq##method##Ptr = ::NYT::TIntrusivePtr<TReq##method>; \
+ using TRsp##method##Ptr = ::NYT::TIntrusivePtr<TRsp##method>; \
+ using TErrorOrRsp##method##Ptr = ::NYT::TErrorOr<TRsp##method##Ptr>; \
\
static TReq##method##Ptr method(const NYT::NYPath::TYPath& path = NYT::NYPath::TYPath()) \
{ \
diff --git a/yt/yt/core/ytree/yson_serializable.h b/yt/yt/core/ytree/yson_serializable.h
index 74b7d97d7d..50f99e47b1 100644
--- a/yt/yt/core/ytree/yson_serializable.h
+++ b/yt/yt/core/ytree/yson_serializable.h
@@ -21,8 +21,8 @@ class TYsonSerializableLite
: private TNonCopyable
{
public:
- typedef std::function<void()> TPostprocessor;
- typedef std::function<void()> TPreprocessor;
+ using TPostprocessor = std::function<void()>;
+ using TPreprocessor = std::function<void()>;
struct IParameter
: public TRefCounted
@@ -59,15 +59,15 @@ public:
virtual void SetKeepUnrecognizedRecursively() = 0;
};
- typedef TIntrusivePtr<IParameter> IParameterPtr;
+ using IParameterPtr = TIntrusivePtr<IParameter>;
template <class T>
class TParameter
: public IParameter
{
public:
- typedef std::function<void(const T&)> TPostprocessor;
- typedef typename TOptionalTraits<T>::TValue TValueType;
+ using TPostprocessor = std::function<void(const T&)>;
+ using TValueType = typename TOptionalTraits<T>::TValue;
TParameter(TString key, T& parameter);
@@ -256,7 +256,7 @@ struct TSerializerTraits<
C,
typename std::enable_if_t<std::is_convertible_v<T&, NYTree::TYsonSerializableLite&>>>
{
- typedef TBinaryYsonSerializer TSerializer;
+ using TSerializer = TBinaryYsonSerializer;
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/core/ytree/yson_struct.h b/yt/yt/core/ytree/yson_struct.h
index 7d336bd6c8..54b10d1993 100644
--- a/yt/yt/core/ytree/yson_struct.h
+++ b/yt/yt/core/ytree/yson_struct.h
@@ -299,7 +299,7 @@ struct TSerializerTraits<
C,
typename std::enable_if_t<std::is_convertible_v<T&, NYTree::TYsonStructBase&>>>
{
- typedef TBinaryYsonStructSerializer TSerializer;
+ using TSerializer = TBinaryYsonStructSerializer;
};
////////////////////////////////////////////////////////////////////////////////
diff --git a/yt/yt/library/profiling/solomon/cube.h b/yt/yt/library/profiling/solomon/cube.h
index ab0006c029..57aaed994b 100644
--- a/yt/yt/library/profiling/solomon/cube.h
+++ b/yt/yt/library/profiling/solomon/cube.h
@@ -15,7 +15,7 @@ namespace NYT::NProfiling {
////////////////////////////////////////////////////////////////////////////////
-typedef std::vector<std::pair<std::vector<int>, TInstant>> TReadWindow;
+using TReadWindow = std::vector<std::pair<std::vector<int>, TInstant>>;
struct TReadOptions
{
diff --git a/yt/yt/library/ytprof/api/api.h b/yt/yt/library/ytprof/api/api.h
index 322c0f951c..f69ccc4c32 100644
--- a/yt/yt/library/ytprof/api/api.h
+++ b/yt/yt/library/ytprof/api/api.h
@@ -30,7 +30,7 @@ struct TProfilerTag final
{ }
};
-typedef TIntrusivePtr<TProfilerTag> TProfilerTagPtr;
+using TProfilerTagPtr = TIntrusivePtr<TProfilerTag>;
constexpr int MaxActiveTags = 4;
diff --git a/yt/yt/library/ytprof/heap_profiler.h b/yt/yt/library/ytprof/heap_profiler.h
index 55752b188d..31489987fe 100644
--- a/yt/yt/library/ytprof/heap_profiler.h
+++ b/yt/yt/library/ytprof/heap_profiler.h
@@ -21,7 +21,7 @@ int AbslStackUnwinder(void** frames, int*,
const void*,
int*);
-typedef uintptr_t TMemoryTag;
+using TMemoryTag = uintptr_t;
TMemoryTag GetMemoryTag();