mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 13:35:34 +08:00
Return a default-constructed QString instead of implicitly converting an empty string literal.
This commit is contained in:
@@ -29,8 +29,8 @@ namespace BlackMisc
|
||||
QString CAirportIcaoCode::unifyAirportCode(const QString &icaoCode)
|
||||
{
|
||||
const QString code = icaoCode.trimmed().toUpper();
|
||||
if (code.length() != 4) return "";
|
||||
if (containsChar(code, [](QChar c) { return !c.isLetterOrNumber(); })) { return ""; }
|
||||
if (code.length() != 4) return {};
|
||||
if (containsChar(code, [](QChar c) { return !c.isLetterOrNumber(); })) { return {}; }
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user