diff --git a/TTKThirdParty/zxing/bigint/BigInteger.cc b/TTKThirdParty/zxing/bigint/BigInteger.cc index 3b23aa1..67ecff7 100644 --- a/TTKThirdParty/zxing/bigint/BigInteger.cc +++ b/TTKThirdParty/zxing/bigint/BigInteger.cc @@ -60,13 +60,13 @@ BigInteger::BigInteger(unsigned short x) : mag(x) { sign = mag.isZero() ? zero : // For signed input, determine the desired magnitude and sign separately. namespace { - template + template BigInteger::Blk magOf(X x) { /* UX(...) cast needed to stop short(-2^15), which negates to * itself, from sign-extending in the conversion to Blk. */ return BigInteger::Blk(x < 0 ? UX(-x) : x); } - template + template BigInteger::Sign signOf(X x) { return (x == 0) ? BigInteger::zero : (x > 0) ? BigInteger::positive @@ -84,12 +84,12 @@ BigInteger::BigInteger(short x) : sign(signOf(x)), mag(magOf +template inline X convertBigUnsignedToPrimitiveAccess(const BigUnsigned &a) { return a.convertToPrimitive(); } -template +template X BigInteger::convertToUnsignedPrimitive() const { if (sign == negative) throw "BigInteger::to: " @@ -100,7 +100,7 @@ X BigInteger::convertToUnsignedPrimitive() const { /* Similar to BigUnsigned::convertToPrimitive, but split into two cases for * nonnegative and negative numbers. */ -template +template X BigInteger::convertToSignedPrimitive() const { if (sign == zero) return 0; diff --git a/TTKThirdParty/zxing/bigint/BigInteger.hh b/TTKThirdParty/zxing/bigint/BigInteger.hh index cf6e910..ed7c336 100644 --- a/TTKThirdParty/zxing/bigint/BigInteger.hh +++ b/TTKThirdParty/zxing/bigint/BigInteger.hh @@ -72,8 +72,8 @@ public: short toShort () const; protected: // Helper - template X convertToUnsignedPrimitive() const; - template X convertToSignedPrimitive() const; + template X convertToUnsignedPrimitive() const; + template X convertToSignedPrimitive() const; public: // ACCESSORS diff --git a/TTKThirdParty/zxing/bigint/BigIntegerUtils.hh b/TTKThirdParty/zxing/bigint/BigIntegerUtils.hh index c815b5d..3db73db 100644 --- a/TTKThirdParty/zxing/bigint/BigIntegerUtils.hh +++ b/TTKThirdParty/zxing/bigint/BigIntegerUtils.hh @@ -16,7 +16,7 @@ BigUnsigned stringToBigUnsigned(const std::string &s); BigInteger stringToBigInteger(const std::string &s); // Creates a BigInteger from data such as `char's; read below for details. -template +template BigInteger dataToBigInteger(const T* data, BigInteger::Index length, BigInteger::Sign sign); // Outputs x to os, obeying the flags `dec', `hex', `bin', and `showbase'. @@ -41,7 +41,7 @@ std::ostream &operator <<(std::ostream &os, const BigInteger &x); * (2) When a value of `T' is casted to a `Blk', the low bytes of * the result contain the desired binary data. */ -template +template BigInteger dataToBigInteger(const T* data, BigInteger::Index length, BigInteger::Sign sign) { // really ceiling(numBytes / sizeof(BigInteger::Blk)) unsigned int pieceSizeInBits = 8 * sizeof(T); diff --git a/TTKThirdParty/zxing/bigint/BigUnsigned.hh b/TTKThirdParty/zxing/bigint/BigUnsigned.hh index 9228753..eee83fa 100644 --- a/TTKThirdParty/zxing/bigint/BigUnsigned.hh +++ b/TTKThirdParty/zxing/bigint/BigUnsigned.hh @@ -62,8 +62,8 @@ public: BigUnsigned( short x); protected: // Helpers - template void initFromPrimitive (X x); - template void initFromSignedPrimitive(X x); + template void initFromPrimitive (X x); + template void initFromSignedPrimitive(X x); public: /* Converters to primitive integer types @@ -77,8 +77,8 @@ public: short toShort () const; protected: // Helpers - template X convertToSignedPrimitive() const; - template X convertToPrimitive () const; + template X convertToSignedPrimitive() const; + template X convertToPrimitive () const; public: // BIT/BLOCK ACCESSORS @@ -236,7 +236,7 @@ public: unsigned int y); // See BigInteger.cc. - template + template friend X convertBigUnsignedToPrimitiveAccess(const BigUnsigned &a); }; @@ -352,7 +352,7 @@ inline void BigUnsigned::operator >>=(int b) { * reduce code duplication. (Don't worry: this is protected and we instantiate * it only with primitive integer types.) Type X could be signed, but x is * known to be nonnegative. */ -template +template void BigUnsigned::initFromPrimitive(X x) { if (x == 0) ; // NumberlikeArray already initialized us to zero. @@ -369,7 +369,7 @@ void BigUnsigned::initFromPrimitive(X x) { * initFromPrimitive and let the compiler optimize it out for unsigned-type * instantiations, but I wanted to avoid the warning stupidly issued by g++ for * a condition that is constant in *any* instantiation, even if not in all. */ -template +template void BigUnsigned::initFromSignedPrimitive(X x) { if (x < 0) throw "BigUnsigned constructor: " @@ -383,7 +383,7 @@ void BigUnsigned::initFromSignedPrimitive(X x) { /* Template with the same idea as initFromPrimitive. This might be slightly * slower than the previous version with the masks, but it's much shorter and * clearer, which is the library's stated goal. */ -template +template X BigUnsigned::convertToPrimitive() const { if (len == 0) // The number is zero; return zero. @@ -405,7 +405,7 @@ X BigUnsigned::convertToPrimitive() const { * not a negative one that happened to convert back into the correct nonnegative * one. (E.g., catch incorrect conversion of 2^31 to the long -2^31.) Again, * separated to avoid a g++ warning. */ -template +template X BigUnsigned::convertToSignedPrimitive() const { X x = convertToPrimitive(); if (x >= 0) diff --git a/TTKThirdParty/zxing/bigint/NumberlikeArray.hh b/TTKThirdParty/zxing/bigint/NumberlikeArray.hh index 53c8e5b..ee8c00a 100644 --- a/TTKThirdParty/zxing/bigint/NumberlikeArray.hh +++ b/TTKThirdParty/zxing/bigint/NumberlikeArray.hh @@ -17,7 +17,7 @@ * public: * NumberlikeArray< the-type-argument >::getLength; */ -template +template class NumberlikeArray { public: @@ -87,10 +87,10 @@ public: /* BEGIN TEMPLATE DEFINITIONS. They are present here so that source files that * include this header file can generate the necessary real definitions. */ -template +template const unsigned int NumberlikeArray::N = 8 * sizeof(Blk); -template +template void NumberlikeArray::allocate(Index c) { // If the requested capacity is more than the current capacity... if (c > cap) { @@ -102,7 +102,7 @@ void NumberlikeArray::allocate(Index c) { } } -template +template void NumberlikeArray::allocateAndCopy(Index c) { // If the requested capacity is more than the current capacity... if (c > cap) { @@ -119,7 +119,7 @@ void NumberlikeArray::allocateAndCopy(Index c) { } } -template +template NumberlikeArray::NumberlikeArray(const NumberlikeArray &x) : len(x.len) { // Create array @@ -131,7 +131,7 @@ NumberlikeArray::NumberlikeArray(const NumberlikeArray &x) blk[i] = x.blk[i]; } -template +template void NumberlikeArray::operator=(const NumberlikeArray &x) { /* Calls like a = a have no effect; catch them before the aliasing * causes a problem */ @@ -147,7 +147,7 @@ void NumberlikeArray::operator=(const NumberlikeArray &x) { blk[i] = x.blk[i]; } -template +template NumberlikeArray::NumberlikeArray(const Blk *b, Index blen) : cap(blen), len(blen) { // Create array @@ -158,7 +158,7 @@ NumberlikeArray::NumberlikeArray(const Blk *b, Index blen) blk[i] = b[i]; } -template +template bool NumberlikeArray::operator ==(const NumberlikeArray &x) const { if (len != x.len) // Definitely unequal. diff --git a/TTKThirdParty/zxing/zxing/common/Array.h b/TTKThirdParty/zxing/zxing/common/Array.h index 418bee2..0cc5a99 100644 --- a/TTKThirdParty/zxing/zxing/common/Array.h +++ b/TTKThirdParty/zxing/zxing/common/Array.h @@ -27,7 +27,7 @@ namespace zxing { -template class Array : public Counted { +template class Array : public Counted { protected: public: std::vector values_; @@ -83,7 +83,7 @@ template class Array : public Counted { } }; -template class ArrayRef : public Counted { +template class ArrayRef : public Counted { private: public: Array *array_; @@ -107,7 +107,7 @@ template class ArrayRef : public Counted { reset(other.array_); } - template + template ArrayRef(const ArrayRef &other) : array_(0) { reset(static_cast *>(other.array_)); diff --git a/TTKThirdParty/zxing/zxing/common/Counted.h b/TTKThirdParty/zxing/zxing/common/Counted.h index 31cddcf..93edf46 100644 --- a/TTKThirdParty/zxing/zxing/common/Counted.h +++ b/TTKThirdParty/zxing/zxing/common/Counted.h @@ -53,7 +53,7 @@ class TTK_MODULE_EXPORT Counted { }; /* counting reference to reference-counted objects */ -template class TTK_MODULE_EXPORT Ref { +template class TTK_MODULE_EXPORT Ref { private: public: T *object_; @@ -66,7 +66,7 @@ template class TTK_MODULE_EXPORT Ref { reset(other.object_); } - template + template Ref(const Ref &other) : object_(0) { reset(other.object_); @@ -91,7 +91,7 @@ template class TTK_MODULE_EXPORT Ref { reset(other.object_); return *this; } - template + template Ref& operator=(const Ref &other) { reset(other.object_); return *this; @@ -100,7 +100,7 @@ template class TTK_MODULE_EXPORT Ref { reset(o); return *this; } - template + template Ref& operator=(Y* o) { reset(o); return *this; @@ -122,7 +122,7 @@ template class TTK_MODULE_EXPORT Ref { bool operator==(const Ref &other) const { return object_ == other.object_ || *object_ == *(other.object_); } - template + template bool operator==(const Ref &other) const { return object_ == other.object_ || *object_ == *(other.object_); }