Skip to content

Commit

Permalink
Fixed Doxygen for OEL_ASSERT and reduced warnings in a unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
OleErikPeistorpet committed Jun 1, 2024
1 parent a0fe3ec commit b5ba704
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
#endif


//! Used for checking preconditions. Can be defined to your own
/**
* Used in noexcept functions, so don't expect to catch anything thrown.
* OEL_ASSERT itself should probably be noexcept to avoid bloat. */
#if OEL_MEM_BOUND_DEBUG_LVL == 0
#undef OEL_ASSERT
#define OEL_ASSERT(cond) void(0)
#elif !defined OEL_ASSERT
//! Used for checking preconditions. Can be defined to your own
/**
* Used in noexcept functions, so don't expect to catch anything thrown.
* OEL_ASSERT itself should probably be noexcept to avoid bloat. */
#if defined _MSC_VER
#define OEL_ASSERT(cond) ((cond) or (__debugbreak(), false))
#else
Expand Down
6 changes: 4 additions & 2 deletions unit_test/dynarray_mutate_gtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -886,8 +886,10 @@ TEST_F(dynarrayTest, shrinkToFit)
TEST_F(dynarrayTest, overAligned)
{
constexpr auto testAlignment = OEL_MALLOC_ALIGNMENT * 2;
struct alignas(testAlignment) Type {};

struct alignas(testAlignment) Type
{
double v[2];
};
dynarray<Type> special(oel::reserve, 1);

special.insert(special.begin(), Type());
Expand Down

0 comments on commit b5ba704

Please sign in to comment.