remove unsafe/error-prone constructor

git-svn-id: https://zxing.googlecode.com/svn/trunk@2605 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
smparkes@smparkes.net 2013-04-01 06:00:04 +00:00
parent 9eaaccc985
commit 71df521610
3 changed files with 2 additions and 22 deletions

View file

@ -129,15 +129,6 @@ public:
#endif
reset(a);
}
/*
ArrayRef(const Array<T> &a) :
array_(0) {
#ifdef DEBUG_COUNTING
cout << "instantiating ArrayRef " << this << " from reference to Array " << (void *)&a << ":\n";
#endif
reset(const_cast<Array<T> *>(&a));
}
*/
ArrayRef(const ArrayRef &other) :
Counted(), array_(0) {
#ifdef DEBUG_COUNTING

View file

@ -96,17 +96,6 @@ public:
#endif
reset(o);
}
/*
explicit Ref(const T &o) :
object_(0) {
#ifdef DEBUG_COUNTING
cout << "instantiating Ref " << this << " from reference\n";
#endif
reset(const_cast<T *>(&o));
}
*/
Ref(const Ref &other) :
object_(0) {
#ifdef DEBUG_COUNTING

View file

@ -30,8 +30,8 @@ void BlackPointEstimatorTest::testBasic() {
int histogramRaw[] = { 0, 0, 11, 43, 37, 18, 3, 1, 0, 0, 13, 36, 24, 0, 11, 2 };
vector<int> histogram(histogramRaw, histogramRaw+16);
ArrayRef<int> array (new Array<int>(histogram));
size_t point = GlobalHistogramBinarizer::estimateBlackPoint(array);
CPPUNIT_ASSERT_EQUAL((size_t)64, point);
int point = GlobalHistogramBinarizer::estimateBlackPoint(array);
CPPUNIT_ASSERT_EQUAL((int)64, point);
}
void BlackPointEstimatorTest::testTooLittleRange() {