Browse Source

Add assertion size>0 to MedianFilter

miguelfreitas
Wladimir J. van der Laan 13 years ago
parent
commit
20091df725
  1. 1
      src/util.h

1
src/util.h

@ -599,6 +599,7 @@ public: @@ -599,6 +599,7 @@ public:
T median() const
{
int size = vSorted.size();
assert(size>0);
if(size & 1) // Odd number of elements
{
return vSorted[size/2];

Loading…
Cancel
Save