mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-24 09:54:16 +08:00
Fix in SELCAL class, metadata registration
This commit is contained in:
committed by
Mathew Sutcliffe
parent
6485527062
commit
d7388ea79a
@@ -62,7 +62,7 @@ namespace BlackMisc
|
|||||||
*/
|
*/
|
||||||
const QString &CSelcal::validCharacters()
|
const QString &CSelcal::validCharacters()
|
||||||
{
|
{
|
||||||
static const QString valid = "ABCDEFGHJKLMPQQRS";
|
static const QString valid = "ABCDEFGHJKLMPQRS";
|
||||||
return valid;
|
return valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ namespace BlackMisc
|
|||||||
*/
|
*/
|
||||||
bool CSelcal::isValidCode(const QString &code)
|
bool CSelcal::isValidCode(const QString &code)
|
||||||
{
|
{
|
||||||
if (code.length() != 4) return true;
|
if (code.length() != 4) return false;
|
||||||
int p1, p2, p3, p4;
|
int p1, p2, p3, p4;
|
||||||
if ((p1 = CSelcal::validCharacters().indexOf(code.at(0))) < 0) return false;
|
if ((p1 = CSelcal::validCharacters().indexOf(code.at(0))) < 0) return false;
|
||||||
if ((p2 = CSelcal::validCharacters().indexOf(code.at(1))) < 0) return false;
|
if ((p2 = CSelcal::validCharacters().indexOf(code.at(1))) < 0) return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user