From f5ced347e65f06e835fa8f0333d69e803f5a8a72 Mon Sep 17 00:00:00 2001 From: Lenny Maiorani Date: Wed, 11 Nov 2020 15:21:01 -0700 Subject: AK: Prefer using instead of typedef Problem: - `typedef` is a keyword which comes from C and carries with it old syntax that is hard to read. - Creating type aliases with the `using` keyword allows for easier future maintenance because it supports template syntax. - There is inconsistent use of `typedef` vs `using`. Solution: - Use `clang-tidy`'s checker called `modernize-use-using` to update the syntax to use the newer syntax. - Remove unused functions to make `clang-tidy` happy. - This results in consistency within the codebase. --- AK/NonnullPtrVector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'AK/NonnullPtrVector.h') diff --git a/AK/NonnullPtrVector.h b/AK/NonnullPtrVector.h index 3698015974..31b42102a5 100644 --- a/AK/NonnullPtrVector.h +++ b/AK/NonnullPtrVector.h @@ -32,8 +32,8 @@ namespace AK { template class NonnullPtrVector : public Vector { - typedef typename PtrType::ElementType T; - typedef Vector Base; + using T = typename PtrType::ElementType; + using Base = Vector; public: NonnullPtrVector() -- cgit v1.2.3