diff --git a/.clang-format b/.clang-format index d2501b1579adce52fcf105fd20ba987683b6c001..a90689185b665d6abd00a2ba5b81d714456e3dcb 100644 --- a/.clang-format +++ b/.clang-format @@ -1,13 +1,10 @@ BasedOnStyle: LLVM -BreakBeforeBraces: Linux -BraceWrapping: - AfterNamespace: false - AccessModifierOffset: -4 AllowAllConstructorInitializersOnNextLine: true AllowShortFunctionsOnASingleLine: Inline AllowShortIfStatementsOnASingleLine: false BreakBeforeBinaryOperators: NonAssignment +BreakBeforeBraces: Linux BreakConstructorInitializers : BeforeComma ColumnLimit: 100 ConstructorInitializerAllOnOneLineOrOnePerLine: true diff --git a/Core/Simulation/OffSpecSimulation.h b/Core/Simulation/OffSpecSimulation.h index 77a106915466622aed50f25511079912b8873dfc..b44e25b532fbb28ea1476ac6db86026ff9469570 100644 --- a/Core/Simulation/OffSpecSimulation.h +++ b/Core/Simulation/OffSpecSimulation.h @@ -23,7 +23,7 @@ class Histogram2D; //! Main class to run an off-specular simulation. //! @ingroup simulation -class OffSpecSimulation: public ISimulation2D +class OffSpecSimulation : public ISimulation2D { public: OffSpecSimulation(); diff --git a/Device/Detector/SimpleUnitConverters.h b/Device/Detector/SimpleUnitConverters.h index 7a74ba571151b13e0f7677d5b49fc9028ab4e4ec..c345f7d23c24d00ebcaa383ad4dfb2cfd6347a9b 100644 --- a/Device/Detector/SimpleUnitConverters.h +++ b/Device/Detector/SimpleUnitConverters.h @@ -73,7 +73,7 @@ private: //! Its default units are radians for both axes //! @ingroup simulation_internal -class SphericalConverter: public UnitConverterSimple +class SphericalConverter : public UnitConverterSimple { public: SphericalConverter(const SphericalDetector& detector, const Beam& beam); @@ -97,7 +97,7 @@ private: //! Its default units are mm for both axes //! @ingroup simulation_internal -class RectangularConverter: public UnitConverterSimple +class RectangularConverter : public UnitConverterSimple { public: RectangularConverter(const RectangularDetector& detector, const Beam& beam); @@ -124,7 +124,7 @@ private: //! Its default units are radians for both axes //! @ingroup simulation_internal -class OffSpecularConverter: public UnitConverterSimple +class OffSpecularConverter : public UnitConverterSimple { public: OffSpecularConverter(const IDetector2D& detector, const Beam& beam, const IAxis& alpha_axis); @@ -145,7 +145,7 @@ private: //! Its default units are radians for x-axis and nm for y-axis //! @ingroup simulation_internal -class DepthProbeConverter: public UnitConverterSimple +class DepthProbeConverter : public UnitConverterSimple { public: DepthProbeConverter(const Beam& beam, const IAxis& alpha_axis, const IAxis& z_axis); diff --git a/GUI/coregui/Models/ParameterTranslators.h b/GUI/coregui/Models/ParameterTranslators.h index e509afb2fbeca9f1b89597130d2bf1582a9ddb9e..b63c66bb903f9b3f52088ac3310bc6ed1e8263ed 100644 --- a/GUI/coregui/Models/ParameterTranslators.h +++ b/GUI/coregui/Models/ParameterTranslators.h @@ -29,7 +29,7 @@ public: virtual QStringList translate(const QStringList& list) const = 0; }; -class ModelTypeTranslator: public IPathTranslator +class ModelTypeTranslator : public IPathTranslator { public: ModelTypeTranslator(QString gui_model_type, QString domain_name); @@ -44,7 +44,7 @@ private: QString m_domain_name; }; -class AddElementTranslator: public IPathTranslator +class AddElementTranslator : public IPathTranslator { public: AddElementTranslator(QString gui_name, QString additional_name); @@ -59,7 +59,7 @@ private: QString m_additional_name; }; -class RotationTranslator: public IPathTranslator +class RotationTranslator : public IPathTranslator { public: ~RotationTranslator() override {} @@ -69,7 +69,7 @@ public: QStringList translate(const QStringList& list) const override; }; -class DistributionNoneTranslator: public IPathTranslator +class DistributionNoneTranslator : public IPathTranslator { public: ~DistributionNoneTranslator() override {} @@ -79,7 +79,7 @@ public: QStringList translate(const QStringList& list) const override; }; -class RoughnessTranslator: public IPathTranslator +class RoughnessTranslator : public IPathTranslator { public: RoughnessTranslator(const SessionItem* p_parent); @@ -95,7 +95,7 @@ private: const SessionItem* m_parent; }; -class VectorParameterTranslator: public IPathTranslator +class VectorParameterTranslator : public IPathTranslator { public: VectorParameterTranslator(QString gui_name, std::string base_name, diff --git a/GUI/coregui/Views/SampleDesigner/SampleToolBar.cpp b/GUI/coregui/Views/SampleDesigner/SampleToolBar.cpp index e83abf4a1dce02b358ad4476f2710d41d4c4c393..8713956c0067465762b9888f3380d2b3be7b261c 100644 --- a/GUI/coregui/Views/SampleDesigner/SampleToolBar.cpp +++ b/GUI/coregui/Views/SampleDesigner/SampleToolBar.cpp @@ -44,9 +44,8 @@ SampleToolBar::SampleToolBar(SampleViewActions* sampleActions, QWidget* parent) m_pointerModeGroup = new QButtonGroup(this); m_pointerModeGroup->addButton(selectionPointerButton, DesignerView::RUBBER_SELECTION); m_pointerModeGroup->addButton(handPointerButton, DesignerView::HAND_DRAG); - connect(m_pointerModeGroup, - static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::idClicked), this, - &SampleToolBar::selectionMode); + connect(m_pointerModeGroup, static_cast<void (QButtonGroup::*)(int)>(&QButtonGroup::idClicked), + this, &SampleToolBar::selectionMode); addWidget(selectionPointerButton); addWidget(handPointerButton); diff --git a/Sample/Aggregate/InterferenceFunction1DLattice.h b/Sample/Aggregate/InterferenceFunction1DLattice.h index da2dab277a682c8dae0061b3f2c2e297a20f1781..aa013e4cc4d667158317e79dd081d952e6016d43 100644 --- a/Sample/Aggregate/InterferenceFunction1DLattice.h +++ b/Sample/Aggregate/InterferenceFunction1DLattice.h @@ -22,7 +22,7 @@ class IFTDecayFunction1D; //! Interference function of a 1D lattice. //! @ingroup interference -class InterferenceFunction1DLattice: public IInterferenceFunction +class InterferenceFunction1DLattice : public IInterferenceFunction { public: InterferenceFunction1DLattice(double length, double xi); diff --git a/Sample/Aggregate/InterferenceFunction2DLattice.h b/Sample/Aggregate/InterferenceFunction2DLattice.h index b1c36e3816a42187e640e9dceb403464e065c33e..18a372691dd599714dd9169a66ed9a2924c80ffe 100644 --- a/Sample/Aggregate/InterferenceFunction2DLattice.h +++ b/Sample/Aggregate/InterferenceFunction2DLattice.h @@ -23,7 +23,7 @@ //! Interference function of a 2D lattice. //! @ingroup interference -class InterferenceFunction2DLattice: public IInterferenceFunction +class InterferenceFunction2DLattice : public IInterferenceFunction { public: InterferenceFunction2DLattice(const Lattice2D& lattice); diff --git a/Sample/Aggregate/InterferenceFunction2DParaCrystal.h b/Sample/Aggregate/InterferenceFunction2DParaCrystal.h index 087f6b43438e16e308745f8b57234722d3148a09..101c2cf928d39fd84f63955b0db773ef603fb9d4 100644 --- a/Sample/Aggregate/InterferenceFunction2DParaCrystal.h +++ b/Sample/Aggregate/InterferenceFunction2DParaCrystal.h @@ -26,7 +26,7 @@ class IFTDistribution2D; //! Interference function of a 2D paracrystal. //! @ingroup interference -class InterferenceFunction2DParaCrystal: public IInterferenceFunction +class InterferenceFunction2DParaCrystal : public IInterferenceFunction { public: InterferenceFunction2DParaCrystal(const Lattice2D& lattice, double damping_length, diff --git a/Sample/Aggregate/InterferenceFunction2DSuperLattice.h b/Sample/Aggregate/InterferenceFunction2DSuperLattice.h index 134fd8ba1a67e072cee5bb15b878f071a95f2340..8e13781638f28a239d1002083b05502b3154a727 100644 --- a/Sample/Aggregate/InterferenceFunction2DSuperLattice.h +++ b/Sample/Aggregate/InterferenceFunction2DSuperLattice.h @@ -22,7 +22,7 @@ //! each lattice site. //! @ingroup interference -class InterferenceFunction2DSuperLattice: public IInterferenceFunction +class InterferenceFunction2DSuperLattice : public IInterferenceFunction { public: InterferenceFunction2DSuperLattice(const Lattice2D& lattice, unsigned size_1, unsigned size_2); diff --git a/Sample/Aggregate/InterferenceFunction3DLattice.h b/Sample/Aggregate/InterferenceFunction3DLattice.h index b364cab4ff63b127757448af6499b1924d7dd679..16a7aae43f795dcd56da2d819d3d2ef98fc82c9e 100644 --- a/Sample/Aggregate/InterferenceFunction3DLattice.h +++ b/Sample/Aggregate/InterferenceFunction3DLattice.h @@ -23,7 +23,7 @@ class IPeakShape; //! Interference function of a 3D lattice. //! @ingroup interference -class InterferenceFunction3DLattice: public IInterferenceFunction +class InterferenceFunction3DLattice : public IInterferenceFunction { public: InterferenceFunction3DLattice(const Lattice3D& lattice); diff --git a/Sample/Aggregate/InterferenceFunctionFinite2DLattice.h b/Sample/Aggregate/InterferenceFunctionFinite2DLattice.h index 78a413d7b1ec60ecd904107052c8b27bcfc7d349..5afdf23f79808e5f74c90bb90044231745f73e95 100644 --- a/Sample/Aggregate/InterferenceFunctionFinite2DLattice.h +++ b/Sample/Aggregate/InterferenceFunctionFinite2DLattice.h @@ -21,7 +21,7 @@ //! Interference function of a finite 2D lattice. //! @ingroup interference -class InterferenceFunctionFinite2DLattice: public IInterferenceFunction +class InterferenceFunctionFinite2DLattice : public IInterferenceFunction { public: InterferenceFunctionFinite2DLattice(const Lattice2D& lattice, unsigned N_1, unsigned N_2); diff --git a/Sample/Aggregate/InterferenceFunctionFinite3DLattice.h b/Sample/Aggregate/InterferenceFunctionFinite3DLattice.h index 3248a960468fe909acccf97a585c2eb553335544..93d535f3190b2067d6168152f8ff5485d0ece87e 100644 --- a/Sample/Aggregate/InterferenceFunctionFinite3DLattice.h +++ b/Sample/Aggregate/InterferenceFunctionFinite3DLattice.h @@ -21,7 +21,7 @@ //! Interference function of a finite 3D lattice. //! @ingroup interference -class InterferenceFunctionFinite3DLattice: public IInterferenceFunction +class InterferenceFunctionFinite3DLattice : public IInterferenceFunction { public: InterferenceFunctionFinite3DLattice(const Lattice3D& lattice, unsigned N_1, unsigned N_2, diff --git a/Sample/Aggregate/InterferenceFunctionHardDisk.h b/Sample/Aggregate/InterferenceFunctionHardDisk.h index 30e5d2b8d80d63150b15bd138a8cb8dac8f9e008..4d3c29998f4e2fb25ab0a955895910d2b8950128 100644 --- a/Sample/Aggregate/InterferenceFunctionHardDisk.h +++ b/Sample/Aggregate/InterferenceFunctionHardDisk.h @@ -24,7 +24,7 @@ //! DOI: 10.1080/00268979500101211 //! @ingroup interference -class InterferenceFunctionHardDisk: public IInterferenceFunction +class InterferenceFunctionHardDisk : public IInterferenceFunction { public: InterferenceFunctionHardDisk(double radius, double density, double position_var = 0); diff --git a/Sample/FFCompute/ComputeBA.h b/Sample/FFCompute/ComputeBA.h index 4441232eb6398906e4d623b3d3a0d938ba40ffea..182b36727e180ce4ece3c7e894e64d375849f748 100644 --- a/Sample/FFCompute/ComputeBA.h +++ b/Sample/FFCompute/ComputeBA.h @@ -22,7 +22,7 @@ //! @ingroup formfactors_internal -class ComputeBA: public IComputeFF +class ComputeBA : public IComputeFF { public: ComputeBA(const IFormFactor& ff); diff --git a/Sample/FFCompute/ComputeBAPol.h b/Sample/FFCompute/ComputeBAPol.h index 34b0d8d38bbc26f2c2cfbc8c118c254fb9657e53..39e97a99ef1a6fc0d884f3116f4c89e1d11e9a18 100644 --- a/Sample/FFCompute/ComputeBAPol.h +++ b/Sample/FFCompute/ComputeBAPol.h @@ -23,7 +23,7 @@ //! @ingroup formfactors_internal -class ComputeBAPol: public IComputeFF +class ComputeBAPol : public IComputeFF { public: ComputeBAPol(const IFormFactor& ff); diff --git a/Sample/FFCompute/ComputeDWBA.h b/Sample/FFCompute/ComputeDWBA.h index bc170e19f3023a3ecbae7cce4406f4b4d9974454..439b4c877ff0971fb13d3fb2bf2be2175fede373 100644 --- a/Sample/FFCompute/ComputeDWBA.h +++ b/Sample/FFCompute/ComputeDWBA.h @@ -24,7 +24,7 @@ class ILayerRTCoefficients; //! @ingroup formfactors_internal -class ComputeDWBA: public IComputeFF +class ComputeDWBA : public IComputeFF { public: ComputeDWBA(const IFormFactor& ff); diff --git a/Sample/FFCompute/ComputeDWBAPol.h b/Sample/FFCompute/ComputeDWBAPol.h index 249121a538e15136eb0e80969501b585d02ba09e..34133adc2f1b5c57113030baa84bbc40e81a23e8 100644 --- a/Sample/FFCompute/ComputeDWBAPol.h +++ b/Sample/FFCompute/ComputeDWBAPol.h @@ -24,7 +24,7 @@ class ILayerRTCoefficients; //! @ingroup formfactors_internal -class ComputeDWBAPol: public IComputeFF +class ComputeDWBAPol : public IComputeFF { public: ComputeDWBAPol(const IFormFactor& ff); diff --git a/Sample/Interference/DecouplingApproximationStrategy.h b/Sample/Interference/DecouplingApproximationStrategy.h index 3de1be334739be772c60619cdde621ae2114b318..1e2ea6692297c77d7acc12a80ede4f4b765a7835 100644 --- a/Sample/Interference/DecouplingApproximationStrategy.h +++ b/Sample/Interference/DecouplingApproximationStrategy.h @@ -23,7 +23,7 @@ class SimulationElement; //! in the decoupling approximation. //! @ingroup algorithms_internal -class DecouplingApproximationStrategy: public IInterferenceFunctionStrategy +class DecouplingApproximationStrategy : public IInterferenceFunctionStrategy { public: DecouplingApproximationStrategy(const std::vector<FormFactorCoherentSum>& weighted_formfactors, diff --git a/Sample/Interference/SSCApproximationStrategy.h b/Sample/Interference/SSCApproximationStrategy.h index 7808530566c755f161cd02428a0315a1608770ae..b818c52e862480354adc44b79ed055bdcc11cb72 100644 --- a/Sample/Interference/SSCApproximationStrategy.h +++ b/Sample/Interference/SSCApproximationStrategy.h @@ -25,7 +25,7 @@ class SimulationElement; //! in the size-spacing correlation approximation. //! @ingroup algorithms_internal -class SSCApproximationStrategy: public IInterferenceFunctionStrategy +class SSCApproximationStrategy : public IInterferenceFunctionStrategy { public: SSCApproximationStrategy(const std::vector<FormFactorCoherentSum>& weighted_formfactors, diff --git a/Sample/Particle/FormFactorCoreShell.h b/Sample/Particle/FormFactorCoreShell.h index e73b0404ccd304c481312efafc2c7e9ae720c7c3..e52c10a1a75177f8c62003202bb844dc6b9f955c 100644 --- a/Sample/Particle/FormFactorCoreShell.h +++ b/Sample/Particle/FormFactorCoreShell.h @@ -25,7 +25,7 @@ //! @ingroup formfactors_internal -class FormFactorCoreShell: public IFormFactor +class FormFactorCoreShell : public IFormFactor { public: FormFactorCoreShell(IFormFactor* core, IFormFactor* shell); diff --git a/Sample/Particle/FormFactorCrystal.h b/Sample/Particle/FormFactorCrystal.h index 20631b2c257166c789c3b48d38c9fba760d86167..36a6373656dc158873b2bf13fb0ed78713e262aa 100644 --- a/Sample/Particle/FormFactorCrystal.h +++ b/Sample/Particle/FormFactorCrystal.h @@ -21,7 +21,7 @@ //! The form factor of a MesoCrystal. //! @ingroup formfactors -class FormFactorCrystal: public IFormFactor +class FormFactorCrystal : public IFormFactor { public: FormFactorCrystal(const Lattice3D& lattice, const IFormFactor& basis_form_factor, diff --git a/Sample/Particle/FormFactorWeighted.h b/Sample/Particle/FormFactorWeighted.h index 9c9af4360abc7c0d67d7e498d4e6d104f09176f6..ed70db2f6e5cb22032032acda534debe2bbfdd5b 100644 --- a/Sample/Particle/FormFactorWeighted.h +++ b/Sample/Particle/FormFactorWeighted.h @@ -25,7 +25,7 @@ //! @ingroup formfactors_internal -class FormFactorWeighted: public IFormFactor +class FormFactorWeighted : public IFormFactor { public: FormFactorWeighted(); diff --git a/Sample/Scattering/FormFactorDecoratorMaterial.h b/Sample/Scattering/FormFactorDecoratorMaterial.h index 478901c5d4670f92d70fb7b207afc263ff340db9..d68974ca29338fe1fce42474f6c43db0eca159de 100644 --- a/Sample/Scattering/FormFactorDecoratorMaterial.h +++ b/Sample/Scattering/FormFactorDecoratorMaterial.h @@ -23,7 +23,7 @@ //! refractive index and that of its surrounding material. //! @ingroup formfactors_decorations -class FormFactorDecoratorMaterial: public IFormFactorDecorator +class FormFactorDecoratorMaterial : public IFormFactorDecorator { public: FormFactorDecoratorMaterial(const IFormFactor& ff);