mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
refactor: Remove old formatting comments
This commit is contained in:
@@ -22,7 +22,6 @@ QDBusArgument &operator<<(QDBusArgument &arg, const std::string &s);
|
||||
*/
|
||||
const QDBusArgument &operator>>(const QDBusArgument &arg, std::string &s);
|
||||
|
||||
// *INDENT-OFF*
|
||||
/*!
|
||||
* Operator for streaming enums to QDBusArgument.
|
||||
*/
|
||||
|
||||
@@ -72,14 +72,12 @@ namespace swift::misc
|
||||
/*!
|
||||
* Associative container with value semantics, chooses a sensible default implementation container type.
|
||||
*/
|
||||
// *INDENT-OFF*
|
||||
template <class Key, class Value, template <class...> class Impl = TDefaultAssociativeType>
|
||||
class CDictionary :
|
||||
public mixin::DBusOperators<CDictionary<Key, Value, Impl>>,
|
||||
public mixin::DataStreamOperators<CDictionary<Key, Value, Impl>>,
|
||||
public mixin::JsonOperators<CDictionary<Key, Value, Impl>>,
|
||||
public mixin::String<CDictionary<Key, Value, Impl>>
|
||||
// *INDENT-ON*
|
||||
{
|
||||
//! \copydoc swift::misc::CValueObject::compare
|
||||
friend int compare(const CDictionary &a, const CDictionary &b)
|
||||
|
||||
@@ -237,7 +237,6 @@ namespace swift::misc::geo
|
||||
int CCoordinateGeodetic::clampVector()
|
||||
{
|
||||
int c = 0;
|
||||
// *INDENT-OFF*
|
||||
if (m_x < -1.0)
|
||||
{
|
||||
m_x = -1.0;
|
||||
@@ -268,7 +267,6 @@ namespace swift::misc::geo
|
||||
m_z = 1.0;
|
||||
c++;
|
||||
}
|
||||
// *INDENT-ON*
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
|
||||
//! \endcond
|
||||
|
||||
// *INDENT-OFF*
|
||||
/*!
|
||||
* Macro to define a nested metaclass that describes the attributes of its
|
||||
* enclosing class. Use in the private section of the class.
|
||||
@@ -80,7 +79,6 @@
|
||||
*/
|
||||
#define SWIFT_METAMEMBER_NAMED(MEMBER, NAME, ...) \
|
||||
makeMetaMember(&Class::m_##MEMBER, NAME SWIFT_TRAILING_VA_ARGS(__VA_ARGS__))
|
||||
// *INDENT-ON*
|
||||
|
||||
//! std::string qHash
|
||||
inline size_t qHash(const std::string &key, uint seed) { return qHash(QString::fromStdString(key), seed); }
|
||||
|
||||
@@ -174,7 +174,6 @@ namespace swift::misc
|
||||
void DBusByMetaClass<Derived, Tags...>::baseUnmarshall(CEmpty *, const QDBusArgument &)
|
||||
{}
|
||||
|
||||
// *INDENT-OFF*
|
||||
/*!
|
||||
* When a derived class and a base class both inherit from mixin::DBusByTuple,
|
||||
* the derived class uses this macro to disambiguate the inherited members.
|
||||
@@ -182,7 +181,6 @@ namespace swift::misc
|
||||
#define SWIFT_MISC_DECLARE_USING_MIXIN_DBUS(DERIVED, ...) \
|
||||
using ::swift::misc::mixin::DBusByMetaClass<DERIVED SWIFT_TRAILING_VA_ARGS(__VA_ARGS__)>::marshallToDbus; \
|
||||
using ::swift::misc::mixin::DBusByMetaClass<DERIVED SWIFT_TRAILING_VA_ARGS(__VA_ARGS__)>::unmarshallFromDbus;
|
||||
// *INDENT-ON*
|
||||
|
||||
} // namespace mixin
|
||||
} // namespace swift::misc
|
||||
|
||||
@@ -147,14 +147,12 @@ namespace swift::misc
|
||||
* When a derived class and a base class both inherit from mixin::Index,
|
||||
* the derived class uses this macro to disambiguate the inherited members.
|
||||
*/
|
||||
// *INDENT-OFF*
|
||||
#define SWIFT_MISC_DECLARE_USING_MIXIN_INDEX(DERIVED) \
|
||||
using ::swift::misc::mixin::Index<DERIVED>::apply; \
|
||||
using ::swift::misc::mixin::Index<DERIVED>::setPropertyByIndex; \
|
||||
using ::swift::misc::mixin::Index<DERIVED>::propertyByIndex; \
|
||||
using ::swift::misc::mixin::Index<DERIVED>::comparePropertyByIndex; \
|
||||
using ::swift::misc::mixin::Index<DERIVED>::equalsPropertyByIndex;
|
||||
// *INDENT-ON*
|
||||
|
||||
template <class Derived>
|
||||
void Index<Derived>::setPropertyByIndex(CPropertyIndexRef index, const QVariant &variant)
|
||||
|
||||
@@ -103,7 +103,6 @@ namespace swift::misc
|
||||
return false;
|
||||
}
|
||||
|
||||
// *INDENT-OFF*
|
||||
/*!
|
||||
* When a derived class and a base class both inherit from mixin::MetaType,
|
||||
* the derived class uses this macro to disambiguate the inherited members.
|
||||
@@ -113,7 +112,6 @@ namespace swift::misc
|
||||
using ::swift::misc::mixin::MetaType<DERIVED>::getMetaTypeId; \
|
||||
using ::swift::misc::mixin::MetaType<DERIVED>::getClassName; \
|
||||
using ::swift::misc::mixin::MetaType<DERIVED>::isA;
|
||||
// *INDENT-ON*
|
||||
|
||||
} // namespace mixin
|
||||
} // namespace swift::misc
|
||||
|
||||
@@ -100,7 +100,6 @@ namespace swift::misc::mixin
|
||||
return static_cast<Derived *>(this);
|
||||
}
|
||||
|
||||
// *INDENT-OFF*
|
||||
/*!
|
||||
* When a derived class and a base class both inherit from mixin::String,
|
||||
* the derived class uses this macro to disambiguate the inherited members.
|
||||
@@ -109,7 +108,6 @@ namespace swift::misc::mixin
|
||||
using ::swift::misc::mixin::String<DERIVED>::toQString; \
|
||||
using ::swift::misc::mixin::String<DERIVED>::toStdString; \
|
||||
using ::swift::misc::mixin::String<DERIVED>::stringForStreaming;
|
||||
// *INDENT-ON*
|
||||
} // namespace swift::misc::mixin
|
||||
|
||||
#endif // SWIFT_MISC_MIXIN_MIXINSTRING_H
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace swift::misc::simulation
|
||||
template <size_t N>
|
||||
std::array<double, N> solveTridiagonal(std::array<std::array<double, N>, N> &matrix, std::array<double, N> &d)
|
||||
{
|
||||
// *INDENT-OFF*
|
||||
const auto a = [&matrix](size_t i) -> double & { return matrix[i][i - 1]; }; // subdiagonal
|
||||
const auto b = [&matrix](size_t i) -> double & { return matrix[i][i]; }; // main diagonal
|
||||
const auto c = [&matrix](size_t i) -> double & { return matrix[i][i + 1]; }; // superdiagonal
|
||||
@@ -47,7 +46,6 @@ namespace swift::misc::simulation
|
||||
d[it] -= c(it) * d[it + 1];
|
||||
}
|
||||
return d;
|
||||
// *INDENT-ON*
|
||||
}
|
||||
|
||||
//! \private Linear equation expressed as tridiagonal matrix.
|
||||
@@ -59,7 +57,6 @@ namespace swift::misc::simulation
|
||||
std::array<std::array<double, N>, N> a { {} };
|
||||
std::array<double, N> b { {} };
|
||||
|
||||
// *INDENT-OFF*
|
||||
a[0][0] = 2.0 / (x[1] - x[0]);
|
||||
a[0][1] = 1.0 / (x[1] - x[0]);
|
||||
b[0] = 3.0 * (y[1] - y[0]) / ((x[1] - x[0]) * (x[1] - x[0]));
|
||||
@@ -76,7 +73,6 @@ namespace swift::misc::simulation
|
||||
b[i] = 3.0 * (y[i] - y[i - 1]) / ((x[i] - x[i - 1]) * (x[i] - x[i - 1])) +
|
||||
3.0 * (y[i + 1] - y[i]) / ((x[i + 1] - x[i]) * (x[i + 1] - x[i]));
|
||||
}
|
||||
// *INDENT-ON*
|
||||
|
||||
solveTridiagonal(a, b);
|
||||
return b;
|
||||
|
||||
@@ -58,7 +58,6 @@ namespace XSwiftBus
|
||||
|
||||
CTraffic *CTraffic::s_instance = nullptr;
|
||||
|
||||
// *INDENT-OFF*
|
||||
CTraffic::CTraffic(CSettingsProvider *settingsProvider)
|
||||
: CDBusObject(settingsProvider),
|
||||
m_followPlaneViewNextCommand("org/swift-project/xswiftbus/follow_next_plane",
|
||||
@@ -75,7 +74,6 @@ namespace XSwiftBus
|
||||
// init labels
|
||||
this->setDrawingLabels(this->getSettings().isDrawingLabels());
|
||||
}
|
||||
// *INDENT-ON*
|
||||
|
||||
CTraffic::~CTraffic()
|
||||
{
|
||||
|
||||
@@ -43,14 +43,12 @@ namespace XSwiftBus
|
||||
|
||||
//! @{
|
||||
//! Logger convenience macros
|
||||
// *INDENT-OFF*
|
||||
#define DEBUG_LOG(msg) (XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::DebugMsg, (msg)))
|
||||
#define DEBUG_LOG_C(msg, doLog) \
|
||||
((doLog) ? XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::DebugMsg, (msg)) : static_cast<void>(0))
|
||||
#define INFO_LOG(msg) (XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::InfoMsg, (msg)))
|
||||
#define WARNING_LOG(msg) (XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::WarningMsg, (msg)))
|
||||
#define ERROR_LOG(msg) (XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::ErrorMsg, (msg)))
|
||||
// *INDENT-ON*
|
||||
//! @}
|
||||
|
||||
#endif // SWIFT_SIM_XSWIFTBUS_UTILS_H
|
||||
|
||||
Reference in New Issue
Block a user