Skip to content

Commit

Permalink
Merge pull request #83 from vil02/prefer_using_when_dealinf_with_ptrs
Browse files Browse the repository at this point in the history
style: prefer `using` when dealing with pointers
  • Loading branch information
mertcandav authored Feb 4, 2024
2 parents 8f006ba + 156b318 commit d0ef1a8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions api/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions api/slice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions api/str.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit d0ef1a8

Please sign in to comment.