unpackProvisionalDesignationTest.cpp   unpackProvisionalDesignationTest.cpp 
skipping to change at line 70 skipping to change at line 70
} }
//Can be used both for minor planets and comets with no additional modifica tion, //Can be used both for minor planets and comets with no additional modifica tion,
//as the regular expression for comets will match only capital letters. //as the regular expression for comets will match only capital letters.
int TestClass::unpackAlphanumericNumber (QChar prefix, int lastDigit) int TestClass::unpackAlphanumericNumber (QChar prefix, int lastDigit)
{ {
int cycleCount = lastDigit; int cycleCount = lastDigit;
if (prefix.isDigit()) if (prefix.isDigit())
cycleCount += prefix.digitValue() * 10; cycleCount += prefix.digitValue() * 10;
else if (prefix.isLetter() && prefix.isUpper()) else if (prefix.isLetter() && prefix.isUpper())
cycleCount += (10 + prefix.toAscii() - QChar('A').toAscii()) * 10; cycleCount += (10 + prefix.toLatin1() - QChar('A').toLatin1( )) * 10;
else if (prefix.isLetter() && prefix.isLower()) else if (prefix.isLetter() && prefix.isLower())
cycleCount += (10 + prefix.toAscii() - QChar('a').toAscii()) * 10 + 26*10; cycleCount += (10 + prefix.toLatin1() - QChar('a').toLatin1( )) * 10 + 26*10;
else else
cycleCount = 0; //Error cycleCount = 0; //Error
return cycleCount; return cycleCount;
} }
QString TestClass::unpackMinorPlanetProvisionalDesignation (QString packedD esignation, bool returnHTML) QString TestClass::unpackMinorPlanetProvisionalDesignation (QString packedD esignation, bool returnHTML)
{ {
QRegExp packedFormat("^([IJK])(\\d\\d)([A-Z])([\\dA-Za-z])(\\d)([A-Z ])$"); QRegExp packedFormat("^([IJK])(\\d\\d)([A-Z])([\\dA-Za-z])(\\d)([A-Z ])$");
if (packedFormat.indexIn(packedDesignation) != 0) if (packedFormat.indexIn(packedDesignation) != 0)
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/