Adds documentation, style fixes.
continuous-integration/drone/push Build is failing

This commit is contained in:
Deukhoofd committed 2021-09-25 17:59:06 +02:00
1 parent 73b2270fca
commit dbf6fbc1db
5 files changed
+17 -5

No files matched your search

+5
View File
@@ -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 -1
View File
@@ -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
+5
View File
@@ -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; }
};
}
+5
View File
@@ -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; }
};
}
+1 -4
View File
@@ -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