mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Add a base clang-tidy configuration
This commit is contained in:
parent
0dfaa98e86
commit
9b041f3d74
73 changed files with 484 additions and 279 deletions
|
|
@ -567,14 +567,14 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
void checkSourceIsNotAMember (const ElementType& element)
|
||||
void checkSourceIsNotAMember ([[maybe_unused]] const ElementType& element)
|
||||
{
|
||||
// when you pass a reference to an existing element into a method like add() which
|
||||
// may need to reallocate the array to make more space, the incoming reference may
|
||||
// be deleted indirectly during the reallocation operation! To work around this,
|
||||
// make a local copy of the item you're trying to add (and maybe use std::move to
|
||||
// move it into the add() method to avoid any extra overhead)
|
||||
jassertquiet (std::addressof (element) < begin() || end() <= std::addressof (element));
|
||||
jassert (std::addressof (element) < begin() || end() <= std::addressof (element));
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -134,8 +134,8 @@ public:
|
|||
static constexpr auto vtableForCallable = detail::makeVtable<Fn, Ret, Args...>();
|
||||
vtable = &vtableForCallable;
|
||||
|
||||
auto* ptr = new (&storage) Fn (std::forward<Callable> (callable));
|
||||
jassertquiet ((void*) ptr == (void*) &storage);
|
||||
[[maybe_unused]] auto* ptr = new (&storage) Fn (std::forward<Callable> (callable));
|
||||
jassert ((void*) ptr == (void*) &storage);
|
||||
}
|
||||
|
||||
/** Move constructor. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue