diff --git a/Framework/Algorithms/src/PDDetermineCharacterizations.cpp b/Framework/Algorithms/src/PDDetermineCharacterizations.cpp index 6143acd632f72301910f60056aea42c66bfa30c4..985344a1ab037864366539878821a2cf4a74b70a 100644 --- a/Framework/Algorithms/src/PDDetermineCharacterizations.cpp +++ b/Framework/Algorithms/src/PDDetermineCharacterizations.cpp @@ -54,6 +54,16 @@ const std::string PDDetermineCharacterizations::summary() const { /** * These should match those in LoadPDCharacterizations + * - "frequency" double + * - "wavelength" (double) + * - "bank" (integer) + * - "container" (string) + * - "vanadium" (string) + * - "empty" (string) + * - "d_min" (string) + * - "d_max" (string) + * - "tof_min" (double) + * - "tof_max" (double) * @return The list of expected column names */ std::vector<std::string> getColumnNames() { diff --git a/Framework/CurveFitting/src/Functions/ProcessBackground.cpp b/Framework/CurveFitting/src/Functions/ProcessBackground.cpp index 2dbd2247574549c2d0f79ad0f0cc3f0f3aead376..754765426cb76322961292ca4bfb6a1baa814ec2 100644 --- a/Framework/CurveFitting/src/Functions/ProcessBackground.cpp +++ b/Framework/CurveFitting/src/Functions/ProcessBackground.cpp @@ -91,7 +91,6 @@ void ProcessBackground::init() { // Optional Function Type std::vector<std::string> bkgdtype{"Polynomial", "Chebyshev"}; - // bkgdtype.emplace_back("FullprofPolynomial"); auto bkgdvalidator = boost::make_shared<Kernel::StringListValidator>(bkgdtype); declareProperty( diff --git a/Framework/CurveFitting/test/Algorithms/LeBailFunctionTest.h b/Framework/CurveFitting/test/Algorithms/LeBailFunctionTest.h index 0e66d8496aa000588e83db68bffa92415fb1c262..1eceeb98ba3a00a2d93ec1192ac1ec53c5c20066 100644 --- a/Framework/CurveFitting/test/Algorithms/LeBailFunctionTest.h +++ b/Framework/CurveFitting/test/Algorithms/LeBailFunctionTest.h @@ -214,8 +214,6 @@ public: lebailfunction.function(out, vecX, true, false); TS_ASSERT_THROWS_ANYTHING(lebailfunction.function(out, vecX, true, true)); - // map<string, double> bkgdparmap {{"A0", 0.001},{"A1", 0.}}; - vector<string> vecbkgdparnames(2); vecbkgdparnames[0] = "A0"; vecbkgdparnames[1] = "A1"; diff --git a/Framework/DataHandling/src/GroupDetectors2.cpp b/Framework/DataHandling/src/GroupDetectors2.cpp index 083a03362478dcd97d952a1cd00cd8076a30d30e..10b5087b70c655593577054322ea1b37e7022e1c 100644 --- a/Framework/DataHandling/src/GroupDetectors2.cpp +++ b/Framework/DataHandling/src/GroupDetectors2.cpp @@ -510,19 +510,16 @@ void GroupDetectors2::processXMLFile(std::string fname, loader.getGroupSpectraMap(); // 3. Build m_GroupSpecInds - for (auto dit = mGroupDetectorsMap.begin(); dit != mGroupDetectorsMap.end(); - ++dit) { - m_GroupSpecInds.emplace(dit->first, std::vector<size_t>()); + for (const auto &det : mGroupDetectorsMap) { + m_GroupSpecInds.emplace(det.first, std::vector<size_t>()); } // 4. Detector IDs - for (auto dit = mGroupDetectorsMap.begin(); dit != mGroupDetectorsMap.end(); - ++dit) { - int groupid = dit->first; - std::vector<detid_t> detids = dit->second; + for (const auto &det : mGroupDetectorsMap) { + int groupid = det.first; + const std::vector<detid_t> &detids = det.second; - storage_map::iterator sit; - sit = m_GroupSpecInds.find(groupid); + auto sit = m_GroupSpecInds.find(groupid); if (sit == m_GroupSpecInds.end()) continue; diff --git a/Framework/DataObjects/test/EventWorkspaceTest.h b/Framework/DataObjects/test/EventWorkspaceTest.h index 102cd6979efc1bae0ca3c91c834f6f28502dd405..37471dd5ad500ddaa2f2f340eae093a8053bf517 100644 --- a/Framework/DataObjects/test/EventWorkspaceTest.h +++ b/Framework/DataObjects/test/EventWorkspaceTest.h @@ -621,9 +621,9 @@ public: V3D source(0, 0, 0); V3D sample(10, 0, 0); - std::vector<V3D> detectorPositions{{11, 1, 0}, {11, 1, 0}}; // First detector pos // Second detector sits on the first. + std::vector<V3D> detectorPositions{{11, 1, 0}, {11, 1, 0}}; WorkspaceCreationHelper::createInstrumentForWorkspaceWithDistances( ws, source, sample, detectorPositions); diff --git a/Framework/DataObjects/test/TableWorkspaceTest.h b/Framework/DataObjects/test/TableWorkspaceTest.h index e7425074364691dabe104fcde19723f2e40352a0..e9d99a80826ee460eab5f320973c1020f35ed462 100644 --- a/Framework/DataObjects/test/TableWorkspaceTest.h +++ b/Framework/DataObjects/test/TableWorkspaceTest.h @@ -142,11 +142,6 @@ public: tw.setRowCount(2); TS_ASSERT_EQUALS(tw.rowCount(), 2); TS_ASSERT_EQUALS(cNumb[1], 2); - - // str[0] = "First"; str[1] = "Second"; - // vector<string> names; - // names.emplace_back("Number"); - // names.emplace_back("Name"); } void testRow() { diff --git a/Framework/Geometry/test/CylinderTest.h b/Framework/Geometry/test/CylinderTest.h index 144eb7ee29ec991dbbdbffd032191f5f75938d55..d84d2ac2d225800c44ef2a6dc20c7f1706aaebc9 100644 --- a/Framework/Geometry/test/CylinderTest.h +++ b/Framework/Geometry/test/CylinderTest.h @@ -158,8 +158,8 @@ public: Test the distance of a point from the cylinder */ { - std::vector<std::string> CylStr{"cx 1", "c/x 1.0 1.0 1.0"}; // Cylinder origin // also cylinder at ?origin? + std::vector<std::string> CylStr{"cx 1", "c/x 1.0 1.0 1.0"}; Kernel::V3D P(0, -1.2, 0); double results[] = {1.2 - 1, 1.41661}; diff --git a/Framework/Kernel/src/NexusDescriptor.cpp b/Framework/Kernel/src/NexusDescriptor.cpp index 5033509f46e28caea57d595c82b0e8b0d15da266..357e235674cce1e6c5974de17fe959605f9c7a4c 100644 --- a/Framework/Kernel/src/NexusDescriptor.cpp +++ b/Framework/Kernel/src/NexusDescriptor.cpp @@ -247,7 +247,6 @@ void NexusDescriptor::walkFile(::NeXus::File &file, const std::string &rootPath, const std::string &entryClass = it->second; const std::string entryPath = rootPath + "/" + entryName; if (entryClass == "SDS") { - // tmap.emplace(entryClass, entryPath); pmap.emplace(entryPath, entryClass); } else if (entryClass == "CDF0.0") { // Do nothing with this diff --git a/Framework/MDAlgorithms/src/CentroidPeaksMD2.cpp b/Framework/MDAlgorithms/src/CentroidPeaksMD2.cpp index ad5fa62232151796ffe4a7403f1b7936caf7f05e..33bfa4812f46cec3a004b62f3faddef53da9ac5b 100644 --- a/Framework/MDAlgorithms/src/CentroidPeaksMD2.cpp +++ b/Framework/MDAlgorithms/src/CentroidPeaksMD2.cpp @@ -41,11 +41,6 @@ void CentroidPeaksMD2::init() { Direction::Input), "An input MDEventWorkspace."); - std::vector<std::string> propOptions; - propOptions.emplace_back("Q (lab frame)"); - propOptions.emplace_back("Q (sample frame)"); - propOptions.emplace_back("HKL"); - declareProperty( new PropertyWithValue<double>("PeakRadius", 1.0, Direction::Input), "Fixed radius around each peak position in which to calculate the " diff --git a/Framework/SINQ/src/PoldiUtilities/PoldiPeakCollection.cpp b/Framework/SINQ/src/PoldiUtilities/PoldiPeakCollection.cpp index 3dc19e556a08040566a8af759b398854cf8dce63..68028b3ef3bff952f91a04309e57d63138bdae61 100644 --- a/Framework/SINQ/src/PoldiUtilities/PoldiPeakCollection.cpp +++ b/Framework/SINQ/src/PoldiUtilities/PoldiPeakCollection.cpp @@ -199,16 +199,15 @@ bool PoldiPeakCollection::checkColumns( return false; } - std::vector<std::string> shouldNames; - shouldNames.emplace_back("HKL"); - shouldNames.emplace_back("d"); - shouldNames.emplace_back("delta d"); - shouldNames.emplace_back("Q"); - shouldNames.emplace_back("delta Q"); - shouldNames.emplace_back("Intensity"); - shouldNames.emplace_back("delta Intensity"); - shouldNames.emplace_back("FWHM (rel.)"); - shouldNames.emplace_back("delta FWHM (rel.)"); + std::vector<std::string> shouldNames{"HKL", + "d", + "delta d", + "Q", + "delta Q", + "Intensity", + "delta Intensity", + "FWHM (rel.)", + "delta FWHM (rel.)"}; std::vector<std::string> columnNames = tableWorkspace->getColumnNames(); diff --git a/Framework/SINQ/src/ProjectMD.cpp b/Framework/SINQ/src/ProjectMD.cpp index a3136a920f5d8c7c4fc852e97a8d468f98e00152..a79c1cf0514c5123ca53be85c2833b6cc38e3491 100644 --- a/Framework/SINQ/src/ProjectMD.cpp +++ b/Framework/SINQ/src/ProjectMD.cpp @@ -19,11 +19,7 @@ using namespace Mantid::DataObjects; void ProjectMD::init() { declareProperty(new WorkspaceProperty<IMDHistoWorkspace>("InputWorkspace", "", Direction::Input)); - std::vector<std::string> projectOptions; - projectOptions.emplace_back("X"); - projectOptions.emplace_back("Y"); - projectOptions.emplace_back("Z"); - projectOptions.emplace_back("K"); + std::vector<std::string> projectOptions{"X", "Y", "Z", "K"}; this->declareProperty("ProjectDirection", "Z", boost::make_shared<StringListValidator>(projectOptions), "The project direction"); diff --git a/Framework/SINQ/src/SINQTranspose3D.cpp b/Framework/SINQ/src/SINQTranspose3D.cpp index 4e605366083c780c5ac55c3ba53a2c4167fa3d01..dff9c09e1123e43fd519a34b4d6207ba1f726761 100644 --- a/Framework/SINQ/src/SINQTranspose3D.cpp +++ b/Framework/SINQ/src/SINQTranspose3D.cpp @@ -17,11 +17,7 @@ using namespace Mantid::DataObjects; void SINQTranspose3D::init() { declareProperty(new WorkspaceProperty<IMDHistoWorkspace>("InputWorkspace", "", Direction::Input)); - std::vector<std::string> transposeOptions; - transposeOptions.emplace_back("Y,X,Z"); - transposeOptions.emplace_back("X,Z,Y"); - transposeOptions.emplace_back("TRICS"); - transposeOptions.emplace_back("AMOR"); + std::vector<std::string> transposeOptions{"Y,X,Z", "X,Z,Y", "TRICS", "AMOR"}; this->declareProperty( "TransposeOption", "Y,X,Z", boost::make_shared<StringListValidator>(transposeOptions), diff --git a/Framework/TestHelpers/src/MDEventsTestHelper.cpp b/Framework/TestHelpers/src/MDEventsTestHelper.cpp index 6e05f8bbc3af4fbd40dd0bf1f1103e1ee22f0752..a4268fe8e8c167c0e7a37c1ef3d08ac31b81623f 100644 --- a/Framework/TestHelpers/src/MDEventsTestHelper.cpp +++ b/Framework/TestHelpers/src/MDEventsTestHelper.cpp @@ -241,12 +241,7 @@ MDHistoWorkspace_sptr makeFakeMDHistoWorkspaceGeneral(size_t numDims, double signal, double errorSquared, size_t *numBins, coord_t *min, coord_t *max, std::string name) { - std::vector<std::string> names; - names.emplace_back("x"); - names.emplace_back("y"); - names.emplace_back("z"); - names.emplace_back("t"); - + std::vector<std::string> names{"x", "y", "z", "t"}; // Create MDFrame of General Frame type Mantid::Geometry::GeneralFrame frame( Mantid::Geometry::GeneralFrame::GeneralFrameDistance, "m"); diff --git a/Framework/WorkflowAlgorithms/src/ConvolutionFitSequential.cpp b/Framework/WorkflowAlgorithms/src/ConvolutionFitSequential.cpp index 4fb956ca7172ce06a1c5c929cc8ffad6e9798f8a..ca93f043d7c3be341127f310b33c8102ed5ad5f8 100644 --- a/Framework/WorkflowAlgorithms/src/ConvolutionFitSequential.cpp +++ b/Framework/WorkflowAlgorithms/src/ConvolutionFitSequential.cpp @@ -68,19 +68,14 @@ void ConvolutionFitSequential::init() { "The input workspace for the fit."); auto scv = boost::make_shared<StringContainsValidator>(); - auto requires = std::vector<std::string>(); - requires.emplace_back("Convolution"); - requires.emplace_back("Resolution"); + auto requires = std::vector<std::string>{"Convolution", "Resolution"}; scv->setRequiredStrings(requires); declareProperty("Function", "", scv, "The function that describes the parameters of the fit.", Direction::Input); - std::vector<std::string> backType; - backType.emplace_back("Fixed Flat"); - backType.emplace_back("Fit Flat"); - backType.emplace_back("Fit Linear"); + std::vector<std::string> backType{"Fixed Flat", "Fit Flat", "Fit Linear"}; declareProperty("BackgroundType", "Fixed Flat", boost::make_shared<StringListValidator>(backType), diff --git a/Framework/WorkflowAlgorithms/src/HFIRSANSNormalise.cpp b/Framework/WorkflowAlgorithms/src/HFIRSANSNormalise.cpp index 8054bb0f59376abe3151dbbd73011d711d39e602..fe2c68f1dcaa77410c7744896720eca3d6e08dfe 100644 --- a/Framework/WorkflowAlgorithms/src/HFIRSANSNormalise.cpp +++ b/Framework/WorkflowAlgorithms/src/HFIRSANSNormalise.cpp @@ -20,9 +20,7 @@ void HFIRSANSNormalise::init() { new WorkspaceProperty<>("InputWorkspace", "", Direction::Input), "Workspace to be corrected"); - std::vector<std::string> normOptions; - normOptions.emplace_back("Monitor"); - normOptions.emplace_back("Timer"); + std::vector<std::string> normOptions{"Monitor", "Timer"}; this->declareProperty("NormalisationType", "Monitor", boost::make_shared<StringListValidator>(normOptions), "Type of Normalisation to use"); diff --git a/Framework/WorkflowAlgorithms/src/MuonProcess.cpp b/Framework/WorkflowAlgorithms/src/MuonProcess.cpp index f0b234fbdb54567e0140e454b8d449c2e18ce6e4..c91e0040b6a226449ad2b32987ebce6b1ecd6957 100644 --- a/Framework/WorkflowAlgorithms/src/MuonProcess.cpp +++ b/Framework/WorkflowAlgorithms/src/MuonProcess.cpp @@ -65,10 +65,8 @@ void MuonProcess::init() { PropertyMode::Mandatory), "Input workspace loaded from file (e.g. by LoadMuonNexus)"); - std::vector<std::string> allowedModes; - allowedModes.emplace_back("CorrectAndGroup"); - allowedModes.emplace_back("Analyse"); - allowedModes.emplace_back("Combined"); + std::vector<std::string> allowedModes{"CorrectAndGroup", "Analyse", + "Combined"}; auto modeVal = boost::make_shared<CompositeValidator>(); modeVal->add(boost::make_shared<StringListValidator>(allowedModes)); modeVal->add(boost::make_shared<MandatoryValidator<std::string>>()); @@ -111,10 +109,8 @@ void MuonProcess::init() { declareProperty("Xmin", EMPTY_DBL(), "Minimal X value to include"); declareProperty("Xmax", EMPTY_DBL(), "Maximal X value to include"); - std::vector<std::string> allowedTypes; - allowedTypes.emplace_back("PairAsymmetry"); - allowedTypes.emplace_back("GroupAsymmetry"); - allowedTypes.emplace_back("GroupCounts"); + std::vector<std::string> allowedTypes{"PairAsymmetry", "GroupAsymmetry", + "GroupCounts"}; declareProperty("OutputType", "PairAsymmetry", boost::make_shared<StringListValidator>(allowedTypes), "What kind of workspace required for analysis."); diff --git a/Framework/WorkflowAlgorithms/src/RefReduction.cpp b/Framework/WorkflowAlgorithms/src/RefReduction.cpp index adb6a100dfd6598ff305767bb222052fb2397dce..b9b62d9c6e447c11a850ba67849d76d1cc0596d3 100644 --- a/Framework/WorkflowAlgorithms/src/RefReduction.cpp +++ b/Framework/WorkflowAlgorithms/src/RefReduction.cpp @@ -107,9 +107,7 @@ void RefReduction::init() { setPropertySettings("AngleOffset", new VisibleWhenProperty( "Instrument", IS_EQUAL_TO, "REF_L")); - std::vector<std::string> instrOptions; - instrOptions.emplace_back("REF_L"); - instrOptions.emplace_back("REF_M"); + std::vector<std::string> instrOptions{"REF_L", "REF_M"}; declareProperty("Instrument", "REF_M", boost::make_shared<StringListValidator>(instrOptions), "Instrument to reduce for"); diff --git a/Framework/WorkflowAlgorithms/src/SANSBeamFluxCorrection.cpp b/Framework/WorkflowAlgorithms/src/SANSBeamFluxCorrection.cpp index f2da91d219eb2c0e44cdd0c6c311ee6034b0dade..496bd565e196b129564e582647fdeda350bf6590 100644 --- a/Framework/WorkflowAlgorithms/src/SANSBeamFluxCorrection.cpp +++ b/Framework/WorkflowAlgorithms/src/SANSBeamFluxCorrection.cpp @@ -25,10 +25,7 @@ void SANSBeamFluxCorrection::init() { new WorkspaceProperty<>("InputMonitorWorkspace", "", Direction::Input), "Workspace containing the monitor counts for the sample data"); - std::vector<std::string> exts; - exts.emplace_back("_event.nxs"); - exts.emplace_back(".nxs"); - exts.emplace_back(".nxs.h5"); + std::vector<std::string> exts{"_event.nxs", ".nxs", ".nxs.h5"}; declareProperty(new API::FileProperty("ReferenceFluxFilename", "", API::FileProperty::Load, exts), "File containing the reference flux spectrum."); diff --git a/Framework/WorkflowAlgorithms/src/SetupEQSANSReduction.cpp b/Framework/WorkflowAlgorithms/src/SetupEQSANSReduction.cpp index 0320c8ed542b6601d1d05f6f032a2e6b1d6204e0..b7edf057983ff137a4170c0c042fbab3daa6d896 100644 --- a/Framework/WorkflowAlgorithms/src/SetupEQSANSReduction.cpp +++ b/Framework/WorkflowAlgorithms/src/SetupEQSANSReduction.cpp @@ -86,11 +86,8 @@ void SetupEQSANSReduction::init() { // Beam center std::string center_grp = "Beam Center"; - std::vector<std::string> centerOptions; - centerOptions.emplace_back("None"); - centerOptions.emplace_back("Value"); - centerOptions.emplace_back("DirectBeam"); - centerOptions.emplace_back("Scattering"); + std::vector<std::string> centerOptions{"None", "Value", "DirectBeam", + "Scattering"}; declareProperty("BeamCenterMethod", "None", boost::make_shared<StringListValidator>(centerOptions), @@ -256,9 +253,7 @@ void SetupEQSANSReduction::init() { // Transmission std::string trans_grp = "Transmission"; - std::vector<std::string> transOptions; - transOptions.emplace_back("Value"); - transOptions.emplace_back("DirectBeam"); + std::vector<std::string> transOptions{"Value", "DirectBeam"}; declareProperty("TransmissionMethod", "Value", boost::make_shared<StringListValidator>(transOptions), "Transmission determination method"); @@ -479,10 +474,7 @@ void SetupEQSANSReduction::init() { declareProperty( new ArrayProperty<int>("MaskedEdges"), "Number of pixels to mask on the edges: X-low, X-high, Y-low, Y-high"); - std::vector<std::string> maskOptions; - maskOptions.emplace_back("None"); - maskOptions.emplace_back("Front"); - maskOptions.emplace_back("Back"); + std::vector<std::string> maskOptions{"None", "Front", "Back"}; declareProperty("MaskedSide", "None", boost::make_shared<StringListValidator>(maskOptions), "Mask one side of the detector"); diff --git a/Framework/WorkflowAlgorithms/src/SetupHFIRReduction.cpp b/Framework/WorkflowAlgorithms/src/SetupHFIRReduction.cpp index deda7ec25199e44abbaccf69cfc1978fd43eec6a..641e150580319ac17ad8181a439af71ae09b89cb 100644 --- a/Framework/WorkflowAlgorithms/src/SetupHFIRReduction.cpp +++ b/Framework/WorkflowAlgorithms/src/SetupHFIRReduction.cpp @@ -61,11 +61,8 @@ void SetupHFIRReduction::init() { // Beam center std::string center_grp = "Beam Center"; - std::vector<std::string> centerOptions; - centerOptions.emplace_back("None"); - centerOptions.emplace_back("Value"); - centerOptions.emplace_back("DirectBeam"); - centerOptions.emplace_back("Scattering"); + std::vector<std::string> centerOptions{"None", "Value", "DirectBeam", + "Scattering"}; declareProperty("BeamCenterMethod", "None", boost::make_shared<StringListValidator>(centerOptions), diff --git a/Framework/WorkflowAlgorithms/src/SetupILLD33Reduction.cpp b/Framework/WorkflowAlgorithms/src/SetupILLD33Reduction.cpp index f1633af64ba09daf52ca0c7f491a96f1f4cb49de..7c2d5ce3a7a4851e3c0648f129f7776dd33bdccf 100644 --- a/Framework/WorkflowAlgorithms/src/SetupILLD33Reduction.cpp +++ b/Framework/WorkflowAlgorithms/src/SetupILLD33Reduction.cpp @@ -41,11 +41,8 @@ void SetupILLD33Reduction::init() { // Beam center std::string center_grp = "Beam Center"; - std::vector<std::string> centerOptions; - centerOptions.emplace_back("None"); - centerOptions.emplace_back("Value"); - centerOptions.emplace_back("DirectBeam"); - centerOptions.emplace_back("Scattering"); + std::vector<std::string> centerOptions{"None", "Value", "DirectBeam", + "Scattering"}; declareProperty("BeamCenterMethod", "None", boost::make_shared<StringListValidator>(centerOptions), @@ -182,9 +179,7 @@ void SetupILLD33Reduction::init() { // Transmission std::string trans_grp = "Transmission"; - std::vector<std::string> transOptions; - transOptions.emplace_back("Value"); - transOptions.emplace_back("DirectBeam"); + std::vector<std::string> transOptions{"Value", "DirectBeam"}; declareProperty("TransmissionMethod", "Value", boost::make_shared<StringListValidator>(transOptions), "Transmission determination method"); @@ -394,10 +389,7 @@ void SetupILLD33Reduction::init() { declareProperty( new ArrayProperty<int>("MaskedEdges"), "Number of pixels to mask on the edges: X-low, X-high, Y-low, Y-high"); - std::vector<std::string> maskOptions; - maskOptions.emplace_back("None"); - maskOptions.emplace_back("Front"); - maskOptions.emplace_back("Back"); + std::vector<std::string> maskOptions{"None", "Front", "Back"}; declareProperty("MaskedSide", "None", boost::make_shared<StringListValidator>(maskOptions), "Mask one side of the detector"); diff --git a/MantidQt/CustomInterfaces/src/Indirect/IndirectDataReduction.cpp b/MantidQt/CustomInterfaces/src/Indirect/IndirectDataReduction.cpp index 8da1935e69f5013c5a69046061d51fee1021b3c3..edc8b329b0175a7f43c563b2b156fe5f5eb0672b 100644 --- a/MantidQt/CustomInterfaces/src/Indirect/IndirectDataReduction.cpp +++ b/MantidQt/CustomInterfaces/src/Indirect/IndirectDataReduction.cpp @@ -260,21 +260,14 @@ QMap<QString, QString> IndirectDataReduction::getInstrumentDetails() instDetails["reflection"] = QString::fromStdString(reflection); // List of values to get from IPF - std::vector<std::string> ipfElements; - ipfElements.emplace_back("analysis-type"); - ipfElements.emplace_back("spectra-min"); - ipfElements.emplace_back("spectra-max"); - ipfElements.emplace_back("Efixed"); - ipfElements.emplace_back("peak-start"); - ipfElements.emplace_back("peak-end"); - ipfElements.emplace_back("back-start"); - ipfElements.emplace_back("back-end"); - ipfElements.emplace_back("rebin-default"); - ipfElements.emplace_back("cm-1-convert-choice"); - ipfElements.emplace_back("save-nexus-choice"); - ipfElements.emplace_back("save-ascii-choice"); - ipfElements.emplace_back("fold-frames-choice"); - ipfElements.emplace_back("resolution"); + std::vector<std::string> ipfElements{ + "analysis-type", "spectra-min", + "spectra-max", "Efixed", + "peak-start", "peak-end", + "back-start", "back-end", + "rebin-default", "cm-1-convert-choice", + "save-nexus-choice", "save-ascii-choice", + "fold-frames-choice", "resolution"}; // In the IRIS IPF there is no fmica component if(instrumentName == "IRIS" && analyser == "fmica") diff --git a/MantidQt/CustomInterfaces/src/Reflectometry/ReflMainViewPresenter.cpp b/MantidQt/CustomInterfaces/src/Reflectometry/ReflMainViewPresenter.cpp index 91476d3f781ebc34aa6b41dc67823a3298e28326..146da35d68084f038e880e0694ae01e0cbb38de9 100644 --- a/MantidQt/CustomInterfaces/src/Reflectometry/ReflMainViewPresenter.cpp +++ b/MantidQt/CustomInterfaces/src/Reflectometry/ReflMainViewPresenter.cpp @@ -201,14 +201,13 @@ ReflMainViewPresenter::ReflMainViewPresenter( // should'nt touch. IAlgorithm_sptr alg = AlgorithmManager::Instance().create("ReflectometryReductionOneAuto"); - std::set<std::string> blacklist; - blacklist.insert("ThetaIn"); - blacklist.insert("ThetaOut"); - blacklist.insert("InputWorkspace"); - blacklist.insert("OutputWorkspace"); - blacklist.insert("OutputWorkspaceWavelength"); - blacklist.insert("FirstTransmissionRun"); - blacklist.insert("SecondTransmissionRun"); + std::set<std::string> blacklist{"ThetaIn", + "ThetaOut", + "InputWorkspace", + "OutputWorkspace", + "OutputWorkspaceWavelength", + "FirstTransmissionRun", + "SecondTransmissionRun"}; m_view->setOptionsHintStrategy(new AlgorithmHintStrategy(alg, blacklist)); // If we don't have a searcher yet, use ReflCatalogSearcher diff --git a/MantidQt/SliceViewer/src/PeakPalette.cpp b/MantidQt/SliceViewer/src/PeakPalette.cpp index 47015c6e8f6ce4b9bf1f318e8f446bf85d089802..62c4dc79c773dff180154b332ce09279dfdb30e7 100644 --- a/MantidQt/SliceViewer/src/PeakPalette.cpp +++ b/MantidQt/SliceViewer/src/PeakPalette.cpp @@ -9,29 +9,14 @@ namespace MantidQt { PeakPalette::PeakPalette() { - int index = 0; - m_foregroundMap.emplace(index++, QColor("#bf7651")); - m_foregroundMap.emplace(index++, QColor("#bd97cb")); - m_foregroundMap.emplace(index++, QColor("#ceeeea")); - m_foregroundMap.emplace(index++, QColor("#da4a52")); - m_foregroundMap.emplace(index++, QColor("#9bc888")); - m_foregroundMap.emplace(index++, QColor("#ffe181")); - m_foregroundMap.emplace(index++, QColor("#e8b7c1")); - m_foregroundMap.emplace(index++, QColor("#f38235")); - m_foregroundMap.emplace(index++, QColor("#8390c6")); - m_foregroundMap.emplace(index, QColor("#4ca0ac")); - - index = 0; - m_backgroundMap.emplace(index++, QColor("#bf7651")); - m_backgroundMap.emplace(index++, QColor("#bd97cb")); - m_backgroundMap.emplace(index++, QColor("#ceeeea")); - m_backgroundMap.emplace(index++, QColor("#da4a52")); - m_backgroundMap.emplace(index++, QColor("#9bc888")); - m_backgroundMap.emplace(index++, QColor("#ffe181")); - m_backgroundMap.emplace(index++, QColor("#e8b7c1")); - m_backgroundMap.emplace(index++, QColor("#f38235")); - m_backgroundMap.emplace(index++, QColor("#8390c6")); - m_backgroundMap.emplace(index, QColor("#4ca0ac")); + m_foregroundMap = {{0, {"#bf7651"}}, {1, {"#bd97cb"}}, {2, {"#ceeeea"}}, + {3, {"#da4a52"}}, {4, {"#9bc888"}}, {5, {"#ffe181"}}, + {6, {"#e8b7c1"}}, {7, {"#f38235"}}, {8, {"#8390c6"}}, + {9, {"#4ca0ac"}}}; + m_backgroundMap = {{0, {"#bf7651"}}, {1, {"#bd97cb"}}, {2, {"#ceeeea"}}, + {3, {"#da4a52"}}, {4, {"#9bc888"}}, {5, {"#ffe181"}}, + {6, {"#e8b7c1"}}, {7, {"#f38235"}}, {8, {"#8390c6"}}, + {9, {"#4ca0ac"}}}; } PeakPalette::PeakPalette(const PeakPalette& other) : m_backgroundMap(other.m_backgroundMap), m_foregroundMap(other.m_foregroundMap) diff --git a/MantidQt/SliceViewer/src/QPeaksTableModel.cpp b/MantidQt/SliceViewer/src/QPeaksTableModel.cpp index d8db67c8f67233cdab777276cc831ca169801c80..e33322a1a5d4fddf1e59840f01ad83d89b362c9c 100644 --- a/MantidQt/SliceViewer/src/QPeaksTableModel.cpp +++ b/MantidQt/SliceViewer/src/QPeaksTableModel.cpp @@ -158,48 +158,47 @@ namespace MantidQt m_dataCachePeakIndex(-1), m_peaksWS(peaksWS) { - int index = 0; - m_columnNameMap.emplace(index++, RUNNUMBER); - m_columnNameMap.emplace(index++, DETID); - m_columnNameMap.emplace(index++, H); - m_columnNameMap.emplace(index++, K); - m_columnNameMap.emplace(index++, L); - m_columnNameMap.emplace(index++, WAVELENGTH); - m_columnNameMap.emplace(index++, INITIAL_ENERGY); - m_columnNameMap.emplace(index++, FINAL_ENERGY); - m_columnNameMap.emplace(index++, ENERGY); - m_columnNameMap.emplace(index++, TOF); - m_columnNameMap.emplace(index++, DSPACING); - m_columnNameMap.emplace(index++, INT); - m_columnNameMap.emplace(index++, SIGMINT); - m_columnNameMap.emplace(index++, INT_SIGINT); - m_columnNameMap.emplace(index++, BINCOUNT); - m_columnNameMap.emplace(index++, BANKNAME); - m_columnNameMap.emplace(index++, ROW); - m_columnNameMap.emplace(index++, COL); - m_columnNameMap.emplace(index++, QLAB); - m_columnNameMap.emplace(index++, QSAMPLE); - - m_sortableColumns.emplace(RUNNUMBER, true); - m_sortableColumns.emplace(DETID, true); - m_sortableColumns.emplace(H, true); - m_sortableColumns.emplace(K, true); - m_sortableColumns.emplace(L, true); - m_sortableColumns.emplace(WAVELENGTH, true); - m_sortableColumns.emplace(ENERGY, false); - m_sortableColumns.emplace(INITIAL_ENERGY, true); - m_sortableColumns.emplace(FINAL_ENERGY, true); - m_sortableColumns.emplace(TOF, true); - m_sortableColumns.emplace(DSPACING, true); - m_sortableColumns.emplace(INT, true); - m_sortableColumns.emplace(SIGMINT, true); - m_sortableColumns.emplace(INT_SIGINT, false); - m_sortableColumns.emplace(BINCOUNT, true); - m_sortableColumns.emplace(BANKNAME, true); - m_sortableColumns.emplace(ROW, true); - m_sortableColumns.emplace(COL, true); - m_sortableColumns.emplace(QLAB, false); - m_sortableColumns.emplace(QSAMPLE, false); + m_columnNameMap = {{0, RUNNUMBER}, + {1, DETID}, + {2, H}, + {3, K}, + {4, L}, + {5, WAVELENGTH}, + {6, INITIAL_ENERGY}, + {7, FINAL_ENERGY}, + {8, ENERGY}, + {9, TOF}, + {10, DSPACING}, + {11, INT}, + {12, SIGMINT}, + {13, INT_SIGINT}, + {14, BINCOUNT}, + {15, BANKNAME}, + {16, ROW}, + {17, COL}, + {18, QLAB}, + {19, QSAMPLE}}; + + m_sortableColumns = {{RUNNUMBER, true}, + {DETID, true}, + {H, true}, + {K, true}, + {L, true}, + {WAVELENGTH, true}, + {ENERGY, false}, + {INITIAL_ENERGY, true}, + {FINAL_ENERGY, true}, + {TOF, true}, + {DSPACING, true}, + {INT, true}, + {SIGMINT, true}, + {INT_SIGINT, false}, + {BINCOUNT, true}, + {BANKNAME, true}, + {ROW, true}, + {COL, true}, + {QLAB, false}, + {QSAMPLE, false}}; if (!Mantid::Kernel::ConfigService::Instance().getValue("PeakColumn.hklPrec", m_hklPrec)) m_hklPrec = 2;