diff --git a/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/StructureFactorCalculator.h b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/StructureFactorCalculator.h index c553e1335fbbb5fcc7aa11d3f0cf320e60baa98f..04b51ff0b49f016817b43884dd822c9c59e09041 100644 --- a/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/StructureFactorCalculator.h +++ b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/StructureFactorCalculator.h @@ -60,17 +60,20 @@ protected: crystalStructureSetHook(const CrystalStructure &crystalStructure); }; -typedef boost::shared_ptr<StructureFactorCalculator> StructureFactorCalculator_sptr; +typedef boost::shared_ptr<StructureFactorCalculator> + StructureFactorCalculator_sptr; namespace StructureFactorCalculatorFactory { - /// Small templated factory function that creates the desired calculator - /// and initializes it by setting the crystal structure. - template<typename T> StructureFactorCalculator_sptr create(const CrystalStructure &crystalStructure) { - boost::shared_ptr<T> calculator = boost::make_shared<T>(); - calculator->setCrystalStructure(crystalStructure); - - return calculator; - } +/// Small templated factory function that creates the desired calculator +/// and initializes it by setting the crystal structure. +template <typename T> +StructureFactorCalculator_sptr +create(const CrystalStructure &crystalStructure) { + boost::shared_ptr<T> calculator = boost::make_shared<T>(); + calculator->setCrystalStructure(crystalStructure); + + return calculator; +} } } // namespace Geometry diff --git a/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/StructureFactorCalculatorSummation.h b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/StructureFactorCalculatorSummation.h index 3f106ff131be86a783e84882dea61e8cbe788493..5cfed836be0c671fee66916460800dcfc735911f 100644 --- a/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/StructureFactorCalculatorSummation.h +++ b/Code/Mantid/Framework/Geometry/inc/MantidGeometry/Crystal/StructureFactorCalculatorSummation.h @@ -56,7 +56,7 @@ protected: }; typedef boost::shared_ptr<StructureFactorCalculatorSummation> -StructureFactorSummation_sptr; + StructureFactorSummation_sptr; } // namespace Geometry } // namespace Mantid diff --git a/Code/Mantid/Framework/Geometry/src/Crystal/ReflectionGenerator.cpp b/Code/Mantid/Framework/Geometry/src/Crystal/ReflectionGenerator.cpp index 4d62508c29111775765fcfd5d0ff2c6d9f97a09f..59fd597ef216ad55f5d601c3a8f688c5e443738d 100644 --- a/Code/Mantid/Framework/Geometry/src/Crystal/ReflectionGenerator.cpp +++ b/Code/Mantid/Framework/Geometry/src/Crystal/ReflectionGenerator.cpp @@ -25,7 +25,7 @@ ReflectionGenerator::ReflectionGenerator( ReflectionConditionFilter defaultFilter) : m_crystalStructure(crystalStructure), m_sfCalculator(StructureFactorCalculatorFactory::create< - StructureFactorCalculatorSummation>(m_crystalStructure)), + StructureFactorCalculatorSummation>(m_crystalStructure)), m_defaultHKLFilter(getReflectionConditionFilter(defaultFilter)) {} /// Returns the internally stored crystal structure diff --git a/Code/Mantid/Framework/Geometry/test/ReflectionGeneratorTest.h b/Code/Mantid/Framework/Geometry/test/ReflectionGeneratorTest.h index 07fb4d76bcae04ecd5d1ae7e8a02c2f325b2e5ee..9c3da2883aa0664fbd38315122247b895a5123cf 100644 --- a/Code/Mantid/Framework/Geometry/test/ReflectionGeneratorTest.h +++ b/Code/Mantid/Framework/Geometry/test/ReflectionGeneratorTest.h @@ -80,8 +80,8 @@ public: CrystalStructure si("5.43 5.43 5.43", "F m -3 m", "Si 0.3 0.3 0.3 1.0 0.05"); - ReflectionGenerator generator( - si, ReflectionConditionFilter::StructureFactor); + ReflectionGenerator generator(si, + ReflectionConditionFilter::StructureFactor); std::vector<V3D> hklsCentering = generator.getUniqueHKLs( 0.6, 10.0, boost::make_shared<HKLFilterCentering>(si.centering())); diff --git a/Code/Mantid/Framework/Geometry/test/StructureFactorCalculatorTest.h b/Code/Mantid/Framework/Geometry/test/StructureFactorCalculatorTest.h index 138437d1e1941cb3ca2386d365b177fbc471717b..a90412ecd8a628bb09d118ef37792ffcf62101c6 100644 --- a/Code/Mantid/Framework/Geometry/test/StructureFactorCalculatorTest.h +++ b/Code/Mantid/Framework/Geometry/test/StructureFactorCalculatorTest.h @@ -54,8 +54,9 @@ public: MockStructureFactorCalculator calculator; int numHKLs = 10; - EXPECT_CALL(calculator, getF(_)).Times(numHKLs).WillRepeatedly( - Return(StructureFactor(2.0, 2.0))); + EXPECT_CALL(calculator, getF(_)) + .Times(numHKLs) + .WillRepeatedly(Return(StructureFactor(2.0, 2.0))); std::vector<V3D> hkls(numHKLs); std::vector<StructureFactor> sfs = calculator.getFs(hkls); @@ -73,8 +74,9 @@ public: MockStructureFactorCalculator calculator; int numHKLs = 10; - EXPECT_CALL(calculator, getF(_)).Times(numHKLs).WillRepeatedly( - Return(StructureFactor(2.0, 2.0))); + EXPECT_CALL(calculator, getF(_)) + .Times(numHKLs) + .WillRepeatedly(Return(StructureFactor(2.0, 2.0))); std::vector<V3D> hkls(numHKLs); std::vector<double> sfsSquared = calculator.getFsSquared(hkls); diff --git a/Code/Mantid/Framework/PythonInterface/mantid/geometry/src/Exports/ReflectionGenerator.cpp b/Code/Mantid/Framework/PythonInterface/mantid/geometry/src/Exports/ReflectionGenerator.cpp index 90d1af8c97af7d3e8f5630752d3c921b657d29e4..83882c117af6c3965b0e7ed3aae8a75d9dab063b 100644 --- a/Code/Mantid/Framework/PythonInterface/mantid/geometry/src/Exports/ReflectionGenerator.cpp +++ b/Code/Mantid/Framework/PythonInterface/mantid/geometry/src/Exports/ReflectionGenerator.cpp @@ -66,8 +66,8 @@ void export_ReflectionGenerator() { .export_values(); class_<ReflectionGenerator>("ReflectionGenerator", no_init) - .def(init<const CrystalStructure &, optional<ReflectionConditionFilter> >( - (arg("crystalStructure"), arg("defaultFilter")))) + .def(init<const CrystalStructure &, optional<ReflectionConditionFilter>>( + (arg("crystalStructure"), arg("defaultFilter")))) .def("getHKLs", &getHKLsDefaultFilter) .def("getHKLsUsingFilter", &getHKLsUsingFilter) .def("getUniqueHKLs", &getUniqueHKLsDefaultFilter) diff --git a/Code/Mantid/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h b/Code/Mantid/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h index 792ac2dcc073a28c7e69b8233f9c2680882be640..717702c21ffc041133aeb9c79238e12b23759e12 100644 --- a/Code/Mantid/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h +++ b/Code/Mantid/Framework/SINQ/inc/MantidSINQ/PoldiUtilities/PoldiMockInstrumentHelpers.h @@ -85,13 +85,13 @@ protected: public: MockChopper() : PoldiAbstractChopper() { - double slits[] = { 0.000000, 0.162156, 0.250867, 0.3704, - 0.439811, 0.588455, 0.761389, 0.895667 }; + double slits[] = {0.000000, 0.162156, 0.250867, 0.3704, + 0.439811, 0.588455, 0.761389, 0.895667}; m_slitPositions = std::vector<double>(slits, slits + sizeof(slits) / sizeof(slits[0])); - double times[] = { 0.000000, 243.234, 376.3, 555.6, - 659.716, 882.682, 1142.08, 1343.5 }; + double times[] = {0.000000, 243.234, 376.3, 555.6, + 659.716, 882.682, 1142.08, 1343.5}; m_slitTimes = std::vector<double>(times, times + sizeof(times) / sizeof(times[0])); }