Style fixes
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Deukhoofd 2022-03-23 14:16:18 +01:00
parent eda1a29427
commit a618f2b98b
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
2 changed files with 7 additions and 7 deletions

View File

@ -27,5 +27,4 @@ using f64 = double;
#define nullable #define nullable
#endif #endif
#endif // ARBUTILS_DEFINES_HPP #endif // ARBUTILS_DEFINES_HPP

View File

@ -10,9 +10,9 @@ namespace ArbUt {
/// pointers will be called. /// pointers will be called.
template <class ValueT> class UniquePtrList { template <class ValueT> class UniquePtrList {
private: private:
std::vector<ValueT* non_null> _vector; std::vector<ValueT * non_null> _vector;
using iterator = typename std::vector<ValueT* non_null>::iterator; using iterator = typename std::vector<ValueT * non_null>::iterator;
using const_iterator = typename std::vector<ValueT* non_null>::const_iterator; using const_iterator = typename std::vector<ValueT * non_null>::const_iterator;
public: public:
/// @brief The type of the value stored in the list. /// @brief The type of the value stored in the list.
@ -21,20 +21,21 @@ namespace ArbUt {
inline UniquePtrList() noexcept : _vector() {} inline UniquePtrList() noexcept : _vector() {}
/// @brief Initialises a UniquePtrList from a std::vector of raw pointers. /// @brief Initialises a UniquePtrList from a std::vector of raw pointers.
/// @param vec A std::vector of raw pointers. /// @param vec A std::vector of raw pointers.
inline UniquePtrList(const std::vector<ValueT* non_null>& vec) : _vector(vec) { EnsureAllNotNull(vec); } inline UniquePtrList(const std::vector<ValueT * non_null>& vec) : _vector(vec) { EnsureAllNotNull(vec); }
/// @brief Initialises a UniquePtrList with a certain capacity reserved for use. This does not set immediate /// @brief Initialises a UniquePtrList with a certain capacity reserved for use. This does not set immediate
/// size. /// size.
/// @param capacity The desired capacity. /// @param capacity The desired capacity.
explicit inline UniquePtrList(size_t capacity) : _vector() { _vector.reserve(capacity); } explicit inline UniquePtrList(size_t capacity) : _vector() { _vector.reserve(capacity); }
/// @brief Initialises a UniquePtrList from a initialiser_list. /// @brief Initialises a UniquePtrList from a initialiser_list.
/// @param l A initialiser_list /// @param l A initialiser_list
inline UniquePtrList(const std::initializer_list<ValueT* non_null>& l) noexcept : _vector(l) { inline UniquePtrList(const std::initializer_list<ValueT * non_null>& l) noexcept : _vector(l) {
EnsureAllNotNull(_vector); EnsureAllNotNull(_vector);
} }
/// @brief Initialises a UniquePtrList from a raw pointer range. /// @brief Initialises a UniquePtrList from a raw pointer range.
/// @param begin The raw pointer to the start of the list. /// @param begin The raw pointer to the start of the list.
/// @param end The raw pointer to the end of the list. /// @param end The raw pointer to the end of the list.
inline UniquePtrList(ValueT* non_null const* non_null begin, ValueT* non_null const* non_null end) noexcept : _vector(begin, end) { inline UniquePtrList(ValueT* non_null const* non_null begin, ValueT* non_null const* non_null end) noexcept
: _vector(begin, end) {
EnsureAllNotNull(_vector); EnsureAllNotNull(_vector);
} }