Clang-Format: Allow empty functions to be single-line

For example

```
OIIOOutputDriver::~OIIOOutputDriver()
{
}
```

becomes

```
OIIOOutputDriver::~OIIOOutputDriver() {}
```

Saves quite some vertical space, which is especially handy for
constructors.

Pull Request: https://projects.blender.org/blender/blender/pulls/105594
This commit is contained in:
Sergey Sharybin
2023-03-29 16:50:54 +02:00
committed by Sergey Sharybin
parent cc7634f2ea
commit d32d787f5f
517 changed files with 1114 additions and 3340 deletions

View File

@@ -7,13 +7,9 @@
#include "IK_QJacobian.h"
IK_QJacobian::IK_QJacobian() : m_sdls(true), m_min_damp(1.0)
{
}
IK_QJacobian::IK_QJacobian() : m_sdls(true), m_min_damp(1.0) {}
IK_QJacobian::~IK_QJacobian()
{
}
IK_QJacobian::~IK_QJacobian() {}
void IK_QJacobian::ArmMatrices(int dof, int task_size)
{

View File

@@ -23,9 +23,7 @@
class IK_QJacobianSolver {
public:
IK_QJacobianSolver();
~IK_QJacobianSolver()
{
}
~IK_QJacobianSolver() {}
// setup pole vector constraint
void SetPoleVectorConstraint(

View File

@@ -339,9 +339,7 @@ void IK_QSphericalSegment::UpdateAngleApply()
// IK_QNullSegment
IK_QNullSegment::IK_QNullSegment() : IK_QSegment(0, false)
{
}
IK_QNullSegment::IK_QNullSegment() : IK_QSegment(0, false) {}
// IK_QRevoluteSegment
@@ -427,9 +425,7 @@ void IK_QRevoluteSegment::SetWeight(int axis, double weight)
// IK_QSwingSegment
IK_QSwingSegment::IK_QSwingSegment() : IK_QSegment(2, false), m_limit_x(false), m_limit_z(false)
{
}
IK_QSwingSegment::IK_QSwingSegment() : IK_QSegment(2, false), m_limit_x(false), m_limit_z(false) {}
void IK_QSwingSegment::SetBasis(const Matrix3d &basis)
{

View File

@@ -154,20 +154,14 @@ class IK_QSegment {
// update the angles using the dTheta's computed using the jacobian matrix
virtual bool UpdateAngle(const IK_QJacobian &, Vector3d &, bool *) = 0;
virtual void Lock(int, IK_QJacobian &, Vector3d &)
{
}
virtual void Lock(int, IK_QJacobian &, Vector3d &) {}
virtual void UpdateAngleApply() = 0;
// set joint limits
virtual void SetLimit(int, double, double)
{
}
virtual void SetLimit(int, double, double) {}
// set joint weights (per axis)
virtual void SetWeight(int, double)
{
}
virtual void SetWeight(int, double) {}
virtual void SetBasis(const Matrix3d &basis)
{
@@ -251,9 +245,7 @@ class IK_QNullSegment : public IK_QSegment {
{
return false;
}
void UpdateAngleApply()
{
}
void UpdateAngleApply() {}
Vector3d Axis(int) const
{

View File

@@ -14,9 +14,7 @@
class IK_QTask {
public:
IK_QTask(int size, bool primary, bool active, const IK_QSegment *segment);
virtual ~IK_QTask()
{
}
virtual ~IK_QTask() {}
int Id() const
{
@@ -62,9 +60,7 @@ class IK_QTask {
return false;
}
virtual void Scale(double)
{
}
virtual void Scale(double) {}
protected:
int m_id;

View File

@@ -17,9 +17,7 @@ using namespace std;
class IK_QSolver {
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
IK_QSolver() : root(NULL)
{
}
IK_QSolver() : root(NULL) {}
IK_QJacobianSolver solver;
IK_QSegment *root;