mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Fixes two virtual calls and one local variable reference. Closes issue 493 and issue 498 and makes UPC-E work.
git-svn-id: https://zxing.googlecode.com/svn/trunk@1509 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
2cb4f5f82b
commit
2de913d220
|
@ -39,7 +39,7 @@ namespace zxing {
|
||||||
|
|
||||||
static int* findStartGuardPattern(Ref<BitArray> row); //throws ReaderException
|
static int* findStartGuardPattern(Ref<BitArray> row); //throws ReaderException
|
||||||
|
|
||||||
int* decodeEnd(Ref<BitArray> row, int endStart); //throws ReaderException
|
virtual int* decodeEnd(Ref<BitArray> row, int endStart); //throws ReaderException
|
||||||
|
|
||||||
static bool checkStandardUPCEANChecksum(std::string s); //throws ReaderException
|
static bool checkStandardUPCEANChecksum(std::string s); //throws ReaderException
|
||||||
protected:
|
protected:
|
||||||
|
@ -58,7 +58,7 @@ namespace zxing {
|
||||||
|
|
||||||
static int decodeDigit(Ref<BitArray> row, int counters[], int countersLen, int rowOffset, UPC_EAN_PATTERNS patternType); //throws ReaderException
|
static int decodeDigit(Ref<BitArray> row, int counters[], int countersLen, int rowOffset, UPC_EAN_PATTERNS patternType); //throws ReaderException
|
||||||
|
|
||||||
bool checkChecksum(std::string s); //throws ReaderException
|
virtual bool checkChecksum(std::string s); //throws ReaderException
|
||||||
|
|
||||||
virtual BarcodeFormat getBarcodeFormat() = 0;
|
virtual BarcodeFormat getBarcodeFormat() = 0;
|
||||||
virtual ~UPCEANReader();
|
virtual ~UPCEANReader();
|
||||||
|
|
|
@ -95,7 +95,7 @@ namespace zxing {
|
||||||
* @param upce UPC-E code as string of digits
|
* @param upce UPC-E code as string of digits
|
||||||
* @return equivalent UPC-A code as string of digits
|
* @return equivalent UPC-A code as string of digits
|
||||||
*/
|
*/
|
||||||
std::string& UPCEReader::convertUPCEtoUPCA(std::string upce) {
|
std::string UPCEReader::convertUPCEtoUPCA(std::string upce) {
|
||||||
std::string result;
|
std::string result;
|
||||||
result.append(1, upce[0]);
|
result.append(1, upce[0]);
|
||||||
char lastChar = upce[6];
|
char lastChar = upce[6];
|
||||||
|
@ -125,8 +125,7 @@ namespace zxing {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
result.append(1, upce[7]);
|
result.append(1, upce[7]);
|
||||||
std::string& returnResult = result;
|
return result;
|
||||||
return returnResult;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ namespace zxing {
|
||||||
UPCEReader();
|
UPCEReader();
|
||||||
|
|
||||||
int decodeMiddle(Ref<BitArray> row, int startRange[], int startRangeLen, std::string& resultString); //throws ReaderException
|
int decodeMiddle(Ref<BitArray> row, int startRange[], int startRangeLen, std::string& resultString); //throws ReaderException
|
||||||
static std::string& convertUPCEtoUPCA(std::string upce);
|
static std::string convertUPCEtoUPCA(std::string upce);
|
||||||
|
|
||||||
BarcodeFormat getBarcodeFormat();
|
BarcodeFormat getBarcodeFormat();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue