@@ -39,8 +39,8 @@ namespace hud
3939 * @param end The pointer one past the last element of the contiguous sequence
4040 */
4141 HD_FORCEINLINE constexpr memory_allocation (type_t *begin, type_t *end) noexcept
42- : begin_ptr (begin)
43- , end_ptr (end)
42+ : begin_ptr_ (begin)
43+ , end_ptr_ (end)
4444 {
4545 }
4646
@@ -50,8 +50,8 @@ namespace hud
5050 * @param count The count of elements in the sequence
5151 */
5252 HD_FORCEINLINE constexpr memory_allocation (type_t *first, const usize count) noexcept
53- : begin_ptr (first)
54- , end_ptr (first + count)
53+ : begin_ptr_ (first)
54+ , end_ptr_ (first + count)
5555 {
5656 }
5757
@@ -62,8 +62,8 @@ namespace hud
6262 */
6363 template <typename u_type_t >
6464 HD_FORCEINLINE constexpr memory_allocation (u_type_t *first, const usize count) noexcept
65- : begin_ptr (first)
66- , end_ptr (first + count)
65+ : begin_ptr_ (first)
66+ , end_ptr_ (first + count)
6767 {
6868 }
6969
@@ -72,11 +72,11 @@ namespace hud
7272 * @param other The `memory_allocation` to be moved
7373 */
7474 HD_FORCEINLINE constexpr memory_allocation (memory_allocation &&other) noexcept
75- : begin_ptr (other.begin_ptr )
76- , end_ptr (other.end_ptr )
75+ : begin_ptr_ (other.begin_ptr_ )
76+ , end_ptr_ (other.end_ptr_ )
7777 {
78- other.begin_ptr = nullptr ;
79- other.end_ptr = nullptr ;
78+ other.begin_ptr_ = nullptr ;
79+ other.end_ptr_ = nullptr ;
8080 }
8181
8282 /* *
@@ -88,10 +88,10 @@ namespace hud
8888 {
8989 if (this != &other) [[likely]]
9090 {
91- begin_ptr = other.begin_ptr ;
92- other.begin_ptr = nullptr ;
93- end_ptr = other.end_ptr ;
94- other.end_ptr = nullptr ;
91+ begin_ptr_ = other.begin_ptr_ ;
92+ other.begin_ptr_ = nullptr ;
93+ end_ptr_ = other.end_ptr_ ;
94+ other.end_ptr_ = nullptr ;
9595 }
9696 return *this ;
9797 }
@@ -102,8 +102,8 @@ namespace hud
102102 */
103103 HD_FORCEINLINE constexpr void leak () noexcept
104104 {
105- begin_ptr = nullptr ;
106- end_ptr = nullptr ;
105+ begin_ptr_ = nullptr ;
106+ end_ptr_ = nullptr ;
107107 }
108108
109109 /* *
@@ -120,19 +120,19 @@ namespace hud
120120 /* * Checks if the `memory_allocation` is empty. */
121121 [[nodiscard]] HD_FORCEINLINE constexpr bool is_empty () const noexcept
122122 {
123- return begin_ptr == end_ptr ;
123+ return begin_ptr_ == end_ptr_ ;
124124 }
125125
126126 /* * Retrieves a pointer to the beginning of the sequence. */
127127 [[nodiscard]] HD_FORCEINLINE constexpr type_t *data () const noexcept
128128 {
129- return begin_ptr ;
129+ return begin_ptr_ ;
130130 }
131131
132132 /* * Retrieves a pointer to the end of the sequence. */
133133 [[nodiscard]] HD_FORCEINLINE constexpr type_t *data_end () const noexcept
134134 {
135- return end_ptr ;
135+ return end_ptr_ ;
136136 }
137137
138138 /* *
@@ -143,14 +143,14 @@ namespace hud
143143 */
144144 [[nodiscard]] constexpr type_t *data_at (const usize index) const noexcept
145145 {
146- check (begin_ptr + index <= end_ptr );
146+ check (begin_ptr_ + index <= end_ptr_ );
147147 return data () + index;
148148 }
149149
150150 /* * Retrieves the count of elements in the `memory_allocation`. */
151151 [[nodiscard]] HD_FORCEINLINE constexpr usize count () const noexcept
152152 {
153- return static_cast <usize>(end_ptr - begin_ptr );
153+ return static_cast <usize>(end_ptr_ - begin_ptr_ );
154154 }
155155
156156 /* * Retrieves the count of bytes in the `memory_allocation`. */
@@ -162,7 +162,7 @@ namespace hud
162162 /* * Checks whether `index` is in a valid range. */
163163 [[nodiscard]] HD_FORCEINLINE constexpr bool is_valid_index (const usize index) const noexcept
164164 {
165- return begin_ptr + index < end_ptr ;
165+ return begin_ptr_ + index < end_ptr_ ;
166166 }
167167
168168 /* *
@@ -176,7 +176,7 @@ namespace hud
176176 [[nodiscard]] memory_allocation<u_type_t > HD_FORCEINLINE reinterpret_cast_to () const noexcept
177177 {
178178 static_assert (alignof (u_type_t ) == alignof (type_t ), " Alignement requirement mismatch" );
179- return memory_allocation<u_type_t > {reinterpret_cast <u_type_t *>(begin_ptr ), reinterpret_cast <u_type_t *>(end_ptr )};
179+ return memory_allocation<u_type_t > {reinterpret_cast <u_type_t *>(begin_ptr_ ), reinterpret_cast <u_type_t *>(end_ptr_ )};
180180 }
181181
182182 /* *
@@ -195,19 +195,19 @@ namespace hud
195195 /* * Convert the allocation to a slice. */
196196 [[nodiscard]] HD_FORCEINLINE constexpr slice<type_t > to_slice () const noexcept
197197 {
198- return slice (begin_ptr , count ());
198+ return slice (begin_ptr_ , count ());
199199 }
200200
201201 /* * Retrieves an iterator_type to the beginning of the slice. */
202202 [[nodiscard]] HD_FORCEINLINE constexpr iterator_type begin () const noexcept
203203 {
204- return iterator_type (begin_ptr );
204+ return iterator_type (begin_ptr_ );
205205 }
206206
207207 /* * Retrieves an iterator_type to the end of the slice. */
208208 [[nodiscard]] HD_FORCEINLINE constexpr iterator_type end () const noexcept
209209 {
210- return iterator_type (end_ptr );
210+ return iterator_type (end_ptr_ );
211211 }
212212
213213 private:
@@ -216,9 +216,9 @@ namespace hud
216216
217217 private:
218218 /* * Pointer to the first element */
219- pointer_type HD_RESTRICT begin_ptr = nullptr ;
219+ pointer_type HD_RESTRICT begin_ptr_ = nullptr ;
220220 /* * Number of element */
221- pointer_type HD_RESTRICT end_ptr = nullptr ;
221+ pointer_type HD_RESTRICT end_ptr_ = nullptr ;
222222 };
223223
224224} // namespace hud
0 commit comments