From e4313d6651e323c22fd793b1d38aacc38f96176c Mon Sep 17 00:00:00 2001 From: Victor Chernyakin <56512186+LocalSpook@users.noreply.github.com> Date: Mon, 14 Aug 2023 08:14:36 -0700 Subject: [PATCH] Use using declarations instead of typedef PR #19458. --- .clang-tidy | 1 - CODING_GUIDELINES.md | 2 +- src/base/bittorrent/speedmonitor.h | 4 ++-- src/base/types.h | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 5143187d0..fec7d003d 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -35,7 +35,6 @@ Checks: > -modernize-use-auto, -modernize-use-nodiscard, -modernize-use-trailing-return-type, - -modernize-use-using, -readability-function-cognitive-complexity, -readability-function-size, -readability-identifier-length, diff --git a/CODING_GUIDELINES.md b/CODING_GUIDELINES.md index 4c4e84083..fc8c2c447 100644 --- a/CODING_GUIDELINES.md +++ b/CODING_GUIDELINES.md @@ -276,7 +276,7 @@ struct StructName {}; enum EnumName {}; -typedef QList SomeList; +using SomeList = QList; namespace NamespaceName { diff --git a/src/base/bittorrent/speedmonitor.h b/src/base/bittorrent/speedmonitor.h index ba1f52e81..bde763e0f 100644 --- a/src/base/bittorrent/speedmonitor.h +++ b/src/base/bittorrent/speedmonitor.h @@ -64,8 +64,8 @@ struct Sample T upload {}; }; -typedef Sample SpeedSample; -typedef Sample SpeedSampleAvg; +using SpeedSample = Sample; +using SpeedSampleAvg = Sample; class SpeedMonitor { diff --git a/src/base/types.h b/src/base/types.h index a5789678c..7bb8a29f7 100644 --- a/src/base/types.h +++ b/src/base/types.h @@ -40,4 +40,4 @@ enum class ShutdownDialogAction Hibernate }; -typedef QMap QStringMap; +using QStringMap = QMap;