mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
Conflicts: src/blackmisc/aviation/avionicsbase.h
This commit is contained in:
@@ -32,10 +32,6 @@ namespace BlackMisc
|
||||
protected:
|
||||
QString m_name; //!< name of the unit
|
||||
|
||||
//! Default constructor
|
||||
//! \todo Remove as part of MS' CValueObject refactoring
|
||||
CAvionicsBase() : m_name("empty") {}
|
||||
|
||||
//! \brief Constructor
|
||||
CAvionicsBase(const QString &name) : m_name(name) {}
|
||||
|
||||
|
||||
@@ -37,11 +37,6 @@ namespace BlackMisc
|
||||
template <class MU, class PQ>
|
||||
QString CPhysicalQuantity<MU, PQ>::getUnitSymbol() const { return this->m_unit.getSymbol(true); }
|
||||
|
||||
template <class MU, class PQ>
|
||||
CPhysicalQuantity<MU, PQ>::CPhysicalQuantity() :
|
||||
m_value(0.0), m_unit(MU::nullUnit())
|
||||
{ }
|
||||
|
||||
template <class MU, class PQ>
|
||||
CPhysicalQuantity<MU, PQ>::CPhysicalQuantity(double value, const MU &unit) :
|
||||
m_value(unit.isNull() ? 0.0 : value), m_unit(unit)
|
||||
|
||||
@@ -217,10 +217,6 @@ namespace BlackMisc
|
||||
QString convertToQString(bool i18n = false) const;
|
||||
|
||||
protected:
|
||||
//! Default constructor
|
||||
//! \todo Remove as part of MS' CValueObject refactoring
|
||||
CPhysicalQuantity();
|
||||
|
||||
//! Constructor with double
|
||||
CPhysicalQuantity(double value, const MU &unit);
|
||||
|
||||
|
||||
@@ -36,6 +36,21 @@
|
||||
namespace BlackMisc
|
||||
{
|
||||
|
||||
namespace Private
|
||||
{
|
||||
//! \private SFINAE for CValueObject constructor to avoid being selected as a viable copy constructor.
|
||||
//! @{
|
||||
template <typename...> struct DecayFirst
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
template <typename T, typename... Ts> struct DecayFirst<T, Ts...>
|
||||
{
|
||||
typedef typename std::decay<T>::type type;
|
||||
};
|
||||
//! @}
|
||||
}
|
||||
|
||||
/*!
|
||||
* Default base class for CValueObject.
|
||||
*/
|
||||
@@ -138,13 +153,10 @@ namespace BlackMisc
|
||||
using Mixin::MetaType<Derived>::registerMetadata;
|
||||
|
||||
protected:
|
||||
//! Default constructor.
|
||||
CValueObject() = default;
|
||||
|
||||
//! Template constructor, forwards all arguments to base class constructor.
|
||||
//! \todo When our compilers support C++11 inheriting constructors, use those instead.
|
||||
template <typename T, typename... Ts, typename = typename std::enable_if<! std::is_same<CValueObject, typename std::decay<T>::type>::value>::type>
|
||||
CValueObject(T &&first, Ts &&... args) : Base(std::forward<T>(first), std::forward<Ts>(args)...) {}
|
||||
template <typename... Ts, typename = typename std::enable_if<! std::is_same<CValueObject, typename Private::DecayFirst<Ts...>::type>::value>::type>
|
||||
CValueObject(Ts &&... args) : Base(std::forward<Ts>(args)...) {}
|
||||
|
||||
//! Copy constructor.
|
||||
CValueObject(const CValueObject &) = default;
|
||||
|
||||
Reference in New Issue
Block a user