Rename Assert.hpp --> Ensure.hpp, style fixes.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#ifndef ARBUTILS_DICTIONARY_HPP
|
||||
#define ARBUTILS_DICTIONARY_HPP
|
||||
#include "../Assert.hpp"
|
||||
#include "../Ensure.hpp"
|
||||
|
||||
namespace ArbUt {
|
||||
/// @brief Wrapper around unordered_map, allowing safer access and adding several helper methods.
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#define Ensure(expr) \
|
||||
if (!(expr)) { \
|
||||
std::stringstream ss; \
|
||||
ss << "[" << file_name(__FILE__) << ":" << __LINE__ << "] ENSURE FAILED: \""; \
|
||||
ss << "[" << file_name(__FILE__) << ":" << __LINE__ << "] ENSURE FAILED: \""; \
|
||||
ss << #expr << "\""; \
|
||||
throw ArbUt::Exception(ss.str()); \
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef ARBUTILS___BORROWEDPTR_HPP
|
||||
#define ARBUTILS___BORROWEDPTR_HPP
|
||||
|
||||
#include "../Assert.hpp"
|
||||
#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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef ARBUTILS___OPTIONALBORROWEDPTR_HPP
|
||||
#define ARBUTILS___OPTIONALBORROWEDPTR_HPP
|
||||
|
||||
#include "../Assert.hpp"
|
||||
#include "../Ensure.hpp"
|
||||
|
||||
namespace ArbUt {
|
||||
/// @brief An optional borrowed pointer is used to indicate a pointer that is not owned by its holder. This pointer
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef ARBUTILS_OPTIONALOptionalUniquePtr_HPP
|
||||
#define ARBUTILS_OPTIONALOptionalUniquePtr_HPP
|
||||
|
||||
#include "../Assert.hpp"
|
||||
#include "../Ensure.hpp"
|
||||
|
||||
namespace ArbUt {
|
||||
/// @brief An optional unique pointer is used to indicate a pointer that is owned by its holder, and will be deleted
|
||||
|
||||
@@ -17,8 +17,8 @@ namespace ArbUt {
|
||||
/// @brief Initialises a OptionalUniquePtrList from a std::vector of raw pointers.
|
||||
/// @param vec A std::vector of raw pointers.
|
||||
inline OptionalUniquePtrList(const std::vector<ValueT*>& vec) noexcept : _vector(vec) {}
|
||||
/// @brief Initialises a OptionalUniquePtrList with a certain capacity reserved for use. This does not set immediate
|
||||
/// size.
|
||||
/// @brief Initialises a OptionalUniquePtrList with a certain capacity reserved for use. This does not set
|
||||
/// immediate size.
|
||||
/// @param capacity The desired capacity.
|
||||
explicit inline OptionalUniquePtrList(size_t capacity) : _vector() { _vector.reserve(capacity); }
|
||||
/// @brief Initialises a OptionalUniquePtrList from a initialiser_list.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef ARBUTILS___SCOPEDPTR_HPP
|
||||
#define ARBUTILS___SCOPEDPTR_HPP
|
||||
|
||||
#include "../Assert.hpp"
|
||||
#include "../Ensure.hpp"
|
||||
|
||||
namespace ArbUt {
|
||||
/// @brief An optional unique pointer is used to indicate a pointer that is owned by its holder, and will be deleted
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef ARBUTILS___UNIQUEPTR_HPP
|
||||
#define ARBUTILS___UNIQUEPTR_HPP
|
||||
|
||||
#include "../Assert.hpp"
|
||||
#include "../Ensure.hpp"
|
||||
|
||||
namespace ArbUt {
|
||||
/// @brief A unique pointer is used to indicate a pointer that is owned by its holder, and will be deleted when its
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef ARBUTILS___UNIQUEPTRLIST_HPP
|
||||
#define ARBUTILS___UNIQUEPTRLIST_HPP
|
||||
|
||||
#include "../Assert.hpp"
|
||||
#include "../Ensure.hpp"
|
||||
#include "__BorrowedPtr.hpp"
|
||||
|
||||
namespace ArbUt {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <cstdint>
|
||||
#include <random>
|
||||
#include "../extern/pcg_random.hpp"
|
||||
#include "Assert.hpp"
|
||||
#include "Ensure.hpp"
|
||||
|
||||
namespace ArbUt {
|
||||
/// @brief A helper class for getting random numbers.
|
||||
|
||||
Reference in New Issue
Block a user