While unit testing Parallelogram, i spot this:
/** Moves this parallelogram by a given amount. */
Parallelogram& operator-= (Point<ValueType> deltaPosition) noexcept
{
return operator-= (-deltaPosition);
}
will generate:
JUCE/modules/juce_graphics/geometry/juce_Parallelogram.h:128:5: warning: all paths through this function will call itself [-Winfinite-recursion]
{
Also found that isEmpty is wrong, this unit test fails:
p = juce.Parallelogram[int](juce.Rectangle[int](10, 10, 20, 20))
assert not p.isEmpty()
Because
/** Returns true if the parallelogram has a width or height of more than zero. */
bool isEmpty() const noexcept { return topLeft != topRight || topLeft != bottomLeft; }
Should really be:
bool isEmpty() const noexcept { return topLeft == topRight || topLeft == bottomLeft; }
