From 156b318fea8491fceb02bf59ffeb4ffdcf58871c Mon Sep 17 00:00:00 2001 From: vil02 Date: Sun, 4 Feb 2024 11:49:34 +0100 Subject: [PATCH] style: prefer `using` when dealing with pointers --- api/array.hpp | 4 ++-- api/slice.hpp | 4 ++-- api/str.hpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/api/array.hpp b/api/array.hpp index b366280b4..1ea684dc1 100644 --- a/api/array.hpp +++ b/api/array.hpp @@ -43,8 +43,8 @@ namespace jule std::fill(this->begin(), this->end(), def); } - typedef Item *Iterator; - typedef const Item *ConstIterator; + using Iterator = Item*; + using ConstIterator = const Item*; constexpr Iterator begin(void) noexcept { diff --git a/api/slice.hpp b/api/slice.hpp index f15b0e4df..2cc225336 100644 --- a/api/slice.hpp +++ b/api/slice.hpp @@ -210,8 +210,8 @@ namespace jule *(this->_slice + i) = def; } - typedef Item *Iterator; - typedef const Item *ConstIterator; + using Iterator = Item*; + using ConstIterator = const Item*; constexpr Iterator begin(void) noexcept { diff --git a/api/str.hpp b/api/str.hpp index b10b52e9a..56bbcc4c6 100644 --- a/api/str.hpp +++ b/api/str.hpp @@ -61,8 +61,8 @@ namespace jule } } - typedef jule::U8 *Iterator; - typedef const jule::U8 *ConstIterator; + using Iterator = jule::U8*; + using ConstIterator = const jule::U8*; __JULE_INLINE_BEFORE_CPP20 __JULE_CONSTEXPR_SINCE_CPP20 Iterator begin(void) noexcept {