mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Ref T241, Ref T243 formatting and minor tweaks
* unified how we write thread_local const * ASSERTs * formatting
This commit is contained in:
@@ -295,7 +295,7 @@ namespace BlackMisc
|
||||
|
||||
const QRegularExpression &CAltitude::fpAltitudeRegExp()
|
||||
{
|
||||
static thread_local QRegularExpression re("((FL|F)\\d{2,3})|(S\\d{2,4})|(A\\d{2,3})|(M\\d{2,4})|(\\d{3,5}(ft|m))");
|
||||
thread_local const QRegularExpression re("((FL|F)\\d{2,3})|(S\\d{2,4})|(A\\d{2,3})|(M\\d{2,4})|(\\d{3,5}(ft|m))");
|
||||
return re;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
//! Class providing static helper methods for different containers
|
||||
class CContainerHelper
|
||||
{
|
||||
@@ -69,7 +68,6 @@ namespace BlackMisc
|
||||
if (a.size() < b.size()) { return -1; }
|
||||
if (b.size() < a.size()) { return 1; }
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
//! Return a new container of a different type, containing the same elements as this one.
|
||||
@@ -101,7 +99,6 @@ namespace BlackMisc
|
||||
return derived().removeIf(BlackMisc::Predicates::MemberEqual(k0, v0, keysValues...));
|
||||
}
|
||||
|
||||
public:
|
||||
//! Simplifies composition, returns 0 for performance
|
||||
friend uint qHash(const Derived &) { return 0; }
|
||||
|
||||
@@ -199,7 +196,6 @@ namespace BlackMisc
|
||||
Derived &derived() { return static_cast<Derived &>(*this); }
|
||||
const Derived &derived() const { return static_cast<const Derived &>(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // guard
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace BlackMisc
|
||||
//! \remark parts logging has a \c bool \c log flag
|
||||
void attachLogger(CInterpolationLogger *logger) { m_logger = logger; }
|
||||
|
||||
//! Is logger attached
|
||||
//! Is logger attached?
|
||||
bool hasAttachedLogger() const { return m_logger; }
|
||||
|
||||
//! Get an interpolator info string (for debug info)
|
||||
|
||||
@@ -132,7 +132,7 @@ namespace BlackMisc
|
||||
if (modelDirs.isEmpty())
|
||||
{
|
||||
this->clearCache();
|
||||
emit loadingFinished(CStatusMessage(this, CStatusMessage::SeverityError, "Model directories '%1' are empty") << modelDirectories.join(", "), simulator, ParsedData);
|
||||
emit this->loadingFinished(CStatusMessage(this, CStatusMessage::SeverityError, "Model directories '%1' are empty") << modelDirectories.join(", "), simulator, ParsedData);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ namespace BlackMisc
|
||||
else if (tokens.at(1) == QLatin1String("acf/_author"))
|
||||
{
|
||||
if (model.getDistributor().hasDescription()) { continue; }
|
||||
const thread_local QRegularExpression end("\\W\\s", QRegularExpression::UseUnicodePropertiesOption);
|
||||
thread_local const QRegularExpression end("\\W\\s", QRegularExpression::UseUnicodePropertiesOption);
|
||||
QString author = line.mid(tokens.at(2).position());
|
||||
author = author.left(author.indexOf(end)).trimmed();
|
||||
if (author.isEmpty()) { continue; }
|
||||
|
||||
Reference in New Issue
Block a user