Commit 556b22a0 authored by Nick Draper's avatar Nick Draper
Browse files

clang format re #27319

parent 24bdf433
......@@ -1676,7 +1676,7 @@ std::vector<std::unique_ptr<IMDIterator>> MatrixWorkspace::createIterators(
if (end > numElements)
end = numElements;
out.emplace_back(std::make_unique<MatrixWorkspaceMDIterator>(this, function,
begin, end));
begin, end));
}
return out;
}
......
......@@ -72,8 +72,9 @@ void MagFormFactorCorrection::exec() {
if (isHist || iax > 0) {
int64_t nQ = QAxis->length() - 1;
for (int64_t iQ = 0; iQ < nQ; iQ++) {
Qvals.emplace_back(0.5 * (QAxis->getValue(static_cast<size_t>(iQ)) +
QAxis->getValue(static_cast<size_t>(iQ + 1))));
Qvals.emplace_back(0.5 *
(QAxis->getValue(static_cast<size_t>(iQ)) +
QAxis->getValue(static_cast<size_t>(iQ + 1))));
}
} else {
int64_t nQ = QAxis->length();
......
......@@ -1146,7 +1146,7 @@ API::MatrixWorkspace_sptr PDCalibration::calculateResolutionTable() {
const double pos = m_peakPositionTable->Double(rowIndex, peakIndex);
if (std::isnormal(pos)) {
resolution.emplace_back(m_peakWidthTable->Double(rowIndex, peakIndex) /
pos);
pos);
}
}
......
......@@ -98,7 +98,8 @@ void RebinByTimeBase::exec() {
static_cast<double>(startTime.totalNanoseconds()));
tStep = inParams[1] * nanoSecondsInASecond;
rebinningParams.emplace_back(tStep);
rebinningParams.emplace_back(static_cast<double>(endTime.totalNanoseconds()));
rebinningParams.emplace_back(
static_cast<double>(endTime.totalNanoseconds()));
} else if (inParams.size() == 1) {
const uint64_t xmin = getMinX(inWS);
const uint64_t xmax = getMaxX(inWS);
......
......@@ -297,7 +297,8 @@ std::vector<double> Stitch1D::getRebinParams(MatrixWorkspace_const_sptr &lhsWS,
if (inputParams.size() == 1) {
std::vector<double> calculatedParams;
calculatedParams.emplace_back(minLHSX);
calculatedParams.emplace_back(inputParams.front()); // Use the step supplied.
calculatedParams.emplace_back(
inputParams.front()); // Use the step supplied.
calculatedParams.emplace_back(maxRHSX);
result = calculatedParams;
} else {
......
......@@ -141,7 +141,7 @@ public:
// there is going to be a small difference between the workspaces that
// will vary with histogram number
forInputB.emplace_back(forInputA.back() *
(1 + m_ramp * (j - (Nhist / 2))));
(1 + m_ramp * (j - (Nhist / 2))));
}
// insert a particularly large value to pick up later
m_LargeValue = 3.1;
......
......@@ -385,8 +385,10 @@ public:
V3D samplePosition = V3D(0.0, 0.0, 0.0);
std::vector<double> guideLogDetails;
guideLogDetails.emplace_back(guideCutoff - 10); // Guide 1 -- Is flipped here
guideLogDetails.emplace_back(guideCutoff + 10); // Guide 2 -- Is flipped here
guideLogDetails.emplace_back(guideCutoff -
10); // Guide 1 -- Is flipped here
guideLogDetails.emplace_back(guideCutoff +
10); // Guide 2 -- Is flipped here
guideLogDetails.emplace_back(guideCutoff + 10); // Guide 3
guideLogDetails.emplace_back(guideCutoff - 10); // Guide 4
guideLogDetails.emplace_back(guideCutoff + 10); // Guide 5
......@@ -418,10 +420,14 @@ public:
V3D samplePosition = V3D(0.0, 0.0, 0.0);
std::vector<double> guideLogDetails;
guideLogDetails.emplace_back(guideCutoff - 10); // Guide 1 -- Is flipped here
guideLogDetails.emplace_back(guideCutoff + 10); // Guide 2 -- Is flipped here
guideLogDetails.emplace_back(guideCutoff - 10); // Guide 3 -- Is flipped here
guideLogDetails.emplace_back(guideCutoff + 10); // Guide 4 -- Is flipped here
guideLogDetails.emplace_back(guideCutoff -
10); // Guide 1 -- Is flipped here
guideLogDetails.emplace_back(guideCutoff +
10); // Guide 2 -- Is flipped here
guideLogDetails.emplace_back(guideCutoff -
10); // Guide 3 -- Is flipped here
guideLogDetails.emplace_back(guideCutoff +
10); // Guide 4 -- Is flipped here
guideLogDetails.emplace_back(guideCutoff + 10); // Guide 5
auto testWorkspace = createTestWorkspace(
......
......@@ -68,8 +68,8 @@ public:
containingAny.emplace_back(cluster);
} else {
containingNone.emplace_back(cluster); // Current iterated set contains
// NEITHER of these labels. It can
// therfore be ignored.
// NEITHER of these labels. It can
// therfore be ignored.
}
}
// ------------ Process equivalent sets
......
......@@ -43,7 +43,8 @@ const std::string SetSpecialCoordinates::HKLOption() {
*/
SetSpecialCoordinates::SetSpecialCoordinates() {
m_specialCoordinatesNames.emplace_back(SetSpecialCoordinates::QLabOption());
m_specialCoordinatesNames.emplace_back(SetSpecialCoordinates::QSampleOption());
m_specialCoordinatesNames.emplace_back(
SetSpecialCoordinates::QSampleOption());
m_specialCoordinatesNames.emplace_back(SetSpecialCoordinates::HKLOption());
m_specialCoordinatesMap.emplace(SetSpecialCoordinates::QLabOption(),
......
......@@ -95,7 +95,8 @@ public:
"Intensity scaling factor for spectrum " + si);
} catch (std::invalid_argument &) {
}
m_IntensityScalingIdx.emplace_back(parameterIndex("IntensityScaling" + si));
m_IntensityScalingIdx.emplace_back(
parameterIndex("IntensityScaling" + si));
}
}
};
......
......@@ -77,7 +77,8 @@ public:
"Intensity scaling factor for spectrum " + si);
} catch (std::invalid_argument &) {
}
m_IntensityScalingIdx.emplace_back(parameterIndex("IntensityScaling" + si));
m_IntensityScalingIdx.emplace_back(
parameterIndex("IntensityScaling" + si));
}
}
/// Declare the Lambda parameter for susceptibility
......
......@@ -38,7 +38,7 @@ GeneralDomainCreator::GeneralDomainCreator(
m_domainColumnNames.emplace_back("ArgumentColumn");
for (size_t i = 1; i < nDomainColumns; ++i) {
m_domainColumnNames.emplace_back(m_domainColumnNames.front() + "_" +
std::to_string(i));
std::to_string(i));
}
}
......
......@@ -186,7 +186,8 @@ LoadEventNexusIndexSetup::filterIndexInfo(const IndexInfo &indexInfo) {
const auto indices = indexInfo.makeIndexSet(
static_cast<SpectrumNumber>(m_min), static_cast<SpectrumNumber>(m_max));
for (const auto index : indices)
m_range.emplace_back(static_cast<int32_t>(indexInfo.spectrumNumber(index)));
m_range.emplace_back(
static_cast<int32_t>(indexInfo.spectrumNumber(index)));
}
// Check if SpectrumList was supplied (or filled via min/max above)
if (!m_range.empty()) {
......
......@@ -393,7 +393,8 @@ void LoadPSIMuonBin::generateUnknownAxis() {
// Create a x axis, assumption that m_histograms will all be the same size,
// and that x will be 1 more in size than y
for (auto xIndex = 0u; xIndex <= m_histograms[0].size(); ++xIndex) {
m_xAxis.emplace_back(static_cast<double>(xIndex) * m_header.histogramBinWidth);
m_xAxis.emplace_back(static_cast<double>(xIndex) *
m_header.histogramBinWidth);
}
// Create Errors
......
......@@ -281,11 +281,11 @@ void LoadPreNexus::runLoadNexusLogs(const string &runinfo,
// put together a list of possible locations
vector<string> possibilities;
possibilities.emplace_back(dataDir + shortName +
"_event.nxs"); // next to runinfo
"_event.nxs"); // next to runinfo
possibilities.emplace_back(dataDir + shortName + "_histo.nxs");
possibilities.emplace_back(dataDir + shortName + ".nxs");
possibilities.emplace_back(dataDir + "../NeXus/" + shortName +
"_event.nxs"); // in NeXus directory
"_event.nxs"); // in NeXus directory
possibilities.emplace_back(dataDir + "../NeXus/" + shortName + "_histo.nxs");
possibilities.emplace_back(dataDir + "../NeXus/" + shortName + ".nxs");
......
......@@ -154,9 +154,10 @@ void LoadTBL::csvParse(std::string line, std::vector<std::string> &cols,
if (pairID < quoteBounds.size() && pos > quoteBounds.at(pairID).at(0)) {
if (pos > quoteBounds.at(pairID).at(1)) {
// use the quote indexes to get the substring
cols.emplace_back(line.substr(quoteBounds.at(pairID).at(0) + 1,
quoteBounds.at(pairID).at(1) -
(quoteBounds.at(pairID).at(0) + 1)));
cols.emplace_back(
line.substr(quoteBounds.at(pairID).at(0) + 1,
quoteBounds.at(pairID).at(1) -
(quoteBounds.at(pairID).at(0) + 1)));
++pairID;
}
} else {
......
......@@ -336,8 +336,9 @@ int PDLoadCharacterizations::readFocusInfo(std::ifstream &file,
break;
} else if (splitted.size() >= 3) { // specid, L2, theta
specIds.emplace_back(lexical_cast<int32_t>(splitted[0], filename, linenum,
"spectrum number"));
l2.emplace_back(lexical_cast<double>(splitted[1], filename, linenum, "l2"));
"spectrum number"));
l2.emplace_back(
lexical_cast<double>(splitted[1], filename, linenum, "l2"));
polar.emplace_back(
lexical_cast<double>(splitted[2], filename, linenum, "polar"));
if (splitted.size() >= 4 &&
......
......@@ -227,7 +227,8 @@ SaveSESANS::calculateError(const HistogramData::HistogramE &eValues,
// Error is calculated as e / (y * wavelength^2)
for (size_t i = 0; i < eValues.size(); i++) {
error.emplace_back(eValues[i] / (yValues[i] * wavelength[i] * wavelength[i]));
error.emplace_back(eValues[i] /
(yValues[i] * wavelength[i] * wavelength[i]));
}
return error;
}
......
......@@ -800,7 +800,7 @@ TMDE(void MDBox)::buildAndAddEvent(const signal_t Signal,
uint16_t runIndex, uint32_t detectorId) {
std::lock_guard<std::mutex> _lock(this->m_dataMutex);
this->data.emplace_back(IF<MDE, nd>::BUILD_EVENT(Signal, errorSq, &point[0],
runIndex, detectorId));
runIndex, detectorId));
}
//-----------------------------------------------------------------------------------------------
......@@ -820,7 +820,7 @@ TMDE(void MDBox)::buildAndAddEventUnsafe(const signal_t Signal,
uint16_t runIndex,
uint32_t detectorId) {
this->data.emplace_back(IF<MDE, nd>::BUILD_EVENT(Signal, errorSq, &point[0],
runIndex, detectorId));
runIndex, detectorId));
}
//-----------------------------------------------------------------------------------------------
......
......@@ -238,7 +238,7 @@ TMDE(std::vector<coord_t> MDEventWorkspace)::estimateResolution() const {
Geometry::IMDDimension_const_sptr dim = this->getDimension(d);
// Calculate the bin size at the smallest split amount
out.emplace_back((dim->getMaximum() - dim->getMinimum()) /
static_cast<coord_t>(finestSplit));
static_cast<coord_t>(finestSplit));
}
return out;
}
......@@ -278,7 +278,8 @@ TMDE(std::vector<std::unique_ptr<Mantid::API::IMDIterator>>
size_t end = ((i + 1) * numElements) / numCores;
if (end > numElements)
end = numElements;
out.emplace_back(std::make_unique<MDBoxIterator<MDE, nd>>(boxes, begin, end));
out.emplace_back(
std::make_unique<MDBoxIterator<MDE, nd>>(boxes, begin, end));
}
return out;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment