I'm getting the following warning:
JUCE\modules\juce_core\containers\juce_ArrayBase.h(155): warning C4723: potential divide by 0
The offending line of code looks like this:
return isPositiveAndBelow (index, numUsed) ? elements[index] : ElementType();
No division there. So it must be an issue with the type that is being compiled with the template.
isPositiveAndBelow doesn't divide either.
template <typename Type>
bool isPositiveAndBelow (int valueToTest, Type upperLimit) noexcept
{
jassert (upperLimit >= 0); // makes no sense to call this if the upper limit is itself below zero..
return static_cast<unsigned int> (valueToTest) < static_cast<unsigned int> (upperLimit);
}
How do I find either, what type is causing the warning? Or what line of code in my code is triggering the warning?