Adds documentation, style fixes.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
73b2270fca
commit
dbf6fbc1db
|
@ -13,6 +13,7 @@ namespace ArbUt {
|
|||
using const_iterator = typename std::vector<ValueT>::const_iterator;
|
||||
|
||||
public:
|
||||
/// @brief The type of the value stored in the list.
|
||||
typedef ValueT type;
|
||||
|
||||
List() noexcept : _vector() {}
|
||||
|
@ -154,7 +155,11 @@ namespace ArbUt {
|
|||
/// @return A std::vector representation of the current list.
|
||||
std::vector<ValueT>& GetStdList() noexcept { return _vector; }
|
||||
|
||||
/// @brief Returns a raw pointer to the current list.
|
||||
/// @return A raw pointer to the current list.
|
||||
inline const List<ValueT>* GetListPointer() const { return this; }
|
||||
/// @brief Returns a raw pointer to the current list.
|
||||
/// @return A raw pointer to the current list.
|
||||
inline List<ValueT>* GetListPointer() { return this; }
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef ARBUTILS___BORROWEDPTR_HPP
|
||||
#define ARBUTILS___BORROWEDPTR_HPP
|
||||
|
||||
#include "../Ensure.hpp"
|
||||
#include <cstddef>
|
||||
#include "../Ensure.hpp"
|
||||
|
||||
namespace ArbUt {
|
||||
/// @brief A borrowed pointer is used to indicate a pointer that is not owned by its holder. As with all Arbutils
|
||||
|
|
|
@ -13,6 +13,7 @@ namespace ArbUt {
|
|||
using const_iterator = typename std::vector<ValueT*>::const_iterator;
|
||||
|
||||
public:
|
||||
/// @brief The type of the value stored in the list.
|
||||
typedef ValueT* type;
|
||||
|
||||
inline OptionalUniquePtrList() noexcept : _vector() {}
|
||||
|
@ -145,7 +146,11 @@ namespace ArbUt {
|
|||
/// @return A std::vector representation of the current list.
|
||||
std::vector<ValueT*>& GetStdList() noexcept { return _vector; }
|
||||
|
||||
/// @brief Returns a raw pointer to the current list.
|
||||
/// @return A raw pointer to the current list.
|
||||
inline const OptionalUniquePtrList<ValueT>* GetListPointer() const { return this; }
|
||||
/// @brief Returns a raw pointer to the current list.
|
||||
/// @return A raw pointer to the current list.
|
||||
inline OptionalUniquePtrList<ValueT>* GetListPointer() { return this; }
|
||||
};
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ namespace ArbUt {
|
|||
using const_iterator = typename std::vector<ValueT*>::const_iterator;
|
||||
|
||||
public:
|
||||
/// @brief The type of the value stored in the list.
|
||||
typedef ValueT* type;
|
||||
|
||||
inline UniquePtrList() noexcept : _vector() {}
|
||||
|
@ -154,7 +155,11 @@ namespace ArbUt {
|
|||
/// @return A std::vector representation of the current list.
|
||||
std::vector<ValueT*>& GetStdList() noexcept { return _vector; }
|
||||
|
||||
/// @brief Returns a raw pointer to the current list.
|
||||
/// @return A raw pointer to the current list.
|
||||
inline const UniquePtrList<ValueT>* GetListPointer() const { return this; }
|
||||
/// @brief Returns a raw pointer to the current list.
|
||||
/// @return A raw pointer to the current list.
|
||||
inline UniquePtrList<ValueT>* GetListPointer() { return this; }
|
||||
};
|
||||
}
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
#include "../src/Memory/Memory.hpp"
|
||||
using namespace ArbUt;
|
||||
|
||||
TEST_CASE("Scoped Pointer deletes child after out of scope") {
|
||||
auto a = ScopedPtr<uint32_t>(new uint32_t(100));
|
||||
}
|
||||
|
||||
TEST_CASE("Scoped Pointer deletes child after out of scope") { auto a = ScopedPtr<uint32_t>(new uint32_t(100)); }
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue