diff options
| author | Wladimir J. van der Laan <[email protected]> | 2011-09-29 17:17:42 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2011-09-29 17:17:42 +0200 |
| commit | 20091df725e56376f6df0f71d19c63a34a5bf71d (patch) | |
| tree | 32b3cb8230700c6d6646b76641319a8fa9b60d0f /src/util.h | |
| parent | Update "other files" in Qt Creator with all documentation now that the projec... (diff) | |
| download | discoin-20091df725e56376f6df0f71d19c63a34a5bf71d.tar.xz discoin-20091df725e56376f6df0f71d19c63a34a5bf71d.zip | |
Add assertion size>0 to MedianFilter
Diffstat (limited to 'src/util.h')
| -rw-r--r-- | src/util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h index 97d638c93..60e99431b 100644 --- a/src/util.h +++ b/src/util.h @@ -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]; |