mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 08:36:52 +08:00
Merge with MS "private instead of protected in CRTP" changes
This commit is contained in:
@@ -23,6 +23,26 @@ class CMatrix3x1; // forward declaration
|
||||
*/
|
||||
template <class ImplVector> class CVector3DBase : public CBaseStreamStringifier<ImplVector>
|
||||
{
|
||||
|
||||
private:
|
||||
/*!
|
||||
* \brief Easy access to derived class (CRTP template parameter)
|
||||
* \return
|
||||
*/
|
||||
ImplVector const *derived() const
|
||||
{
|
||||
return static_cast<ImplVector const *>(this);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Easy access to derived class (CRTP template parameter)
|
||||
* \return
|
||||
*/
|
||||
ImplVector *derived()
|
||||
{
|
||||
return static_cast<ImplVector *>(this);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
// using own value since Qt QVector3D stores internally as float
|
||||
@@ -61,24 +81,6 @@ protected:
|
||||
*/
|
||||
virtual QString stringForConverter() const;
|
||||
|
||||
/*!
|
||||
* \brief Easy access to derived class (CRTP template parameter)
|
||||
* \return
|
||||
*/
|
||||
ImplVector const *derived() const
|
||||
{
|
||||
return static_cast<ImplVector const *>(this);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Easy access to derived class (CRTP template parameter)
|
||||
* \return
|
||||
*/
|
||||
ImplVector *derived()
|
||||
{
|
||||
return static_cast<ImplVector *>(this);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
// getter and setters are implemented in the derived classes
|
||||
|
||||
Reference in New Issue
Block a user