Slight refinement to last change - a cached row which

failed should throw an exception, not return NULL.


git-svn-id: https://zxing.googlecode.com/svn/trunk@1513 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
dswitkin 2010-08-07 12:50:16 +00:00
parent a2226af690
commit ffb33d4c74

View file

@ -41,7 +41,11 @@ GlobalHistogramBinarizer::~GlobalHistogramBinarizer() {
Ref<BitArray> GlobalHistogramBinarizer::getBlackRow(int y, Ref<BitArray> row) {
if (y == cached_row_num_) {
return cached_row_;
if (cached_row_ != NULL) {
return cached_row_;
} else {
throw IllegalArgumentException("Too little dynamic range in luminance");
}
}
vector<int> histogram(LUMINANCE_BUCKETS, 0);