Commit 7200b707 authored by Hahn, Steven's avatar Hahn, Steven
Browse files

Refs #14764. Reviewed files.

parent 146c0c77
......@@ -343,9 +343,9 @@ EventList &EventList::operator+=(const std::vector<TofEvent> &more_events) {
// and append to the list
this->weightedEvents.reserve(this->weightedEvents.size() +
more_events.size());
for (auto it = more_events.begin();
it != more_events.end(); ++it)
this->weightedEvents.push_back(WeightedEvent(*it));
for (const auto &event : more_events) {
this->weightedEvents.emplace_back(event);
}
break;
case WEIGHTED_NOTIME:
......@@ -355,7 +355,7 @@ EventList &EventList::operator+=(const std::vector<TofEvent> &more_events) {
more_events.size());
for (auto it = more_events.begin();
it != more_events.end(); ++it)
this->weightedEventsNoTime.push_back(WeightedEventNoTime(*it));
this->weightedEventsNoTime.emplace_back(*it);
break;
}
......@@ -405,9 +405,9 @@ operator+=(const std::vector<WeightedEvent> &more_events) {
// and append to the list
this->weightedEventsNoTime.reserve(this->weightedEventsNoTime.size() +
more_events.size());
for (auto it = more_events.begin();
it != more_events.end(); ++it)
this->weightedEventsNoTime.push_back(WeightedEventNoTime(*it));
for (const auto &event : more_events) {
this->weightedEventsNoTime.emplace_back(event);
}
break;
}
......@@ -501,14 +501,14 @@ void EventList::minusHelper(std::vector<T1> &events,
* Using it caused a segault, Ticket #2306.
* So we cache the end (this speeds up too).
*/
auto more_begin = more_events.begin();
auto more_end = more_events.end();
auto more_begin = more_events.cbegin();
auto more_end = more_events.cend();
for (itev = more_begin; itev != more_end; itev++) {
// We call the constructor for T1. In the case of WeightedEventNoTime, the
// pulse time will just be ignored.
events.push_back(T1(itev->tof(), itev->pulseTime(), itev->weight() * (-1.0),
itev->errorSquared()));
events.emplace_back(itev->tof(), itev->pulseTime(), itev->weight() * (-1.0),
itev->errorSquared());
}
}
......@@ -1628,10 +1628,7 @@ EventList::compressEventsHelper(const std::vector<T> &events,
double weight = 0;
double errorSquared = 0;
typename std::vector<T>::const_iterator it;
auto it_end =
events.end(); // cache for speed
for (it = events.begin(); it != it_end; it++) {
for (auto it = events.cbegin(); it != events.cend(); it++) {
if ((it->m_tof - lastTof) <= tolerance) {
// Carry the error and weight
weight += it->weight();
......@@ -1847,9 +1844,8 @@ void EventList::compressEvents(double tolerance, EventList *destination,
template <class T>
typename std::vector<T>::const_iterator
EventList::findFirstEvent(const std::vector<T> &events, const double seek_tof) {
auto itev = events.begin();
auto itev_end =
events.end(); // cache for speed
auto itev = events.cbegin();
auto itev_end = events.cend(); // cache for speed
// if tof < X[0], that means that you need to skip some events
while ((itev != itev_end) && (itev->tof() < seek_tof))
......@@ -1903,9 +1899,8 @@ template <class T>
typename std::vector<T>::const_iterator EventList::findFirstTimeAtSampleEvent(
const std::vector<T> &events, const double seek_time,
const double &tofFactor, const double &tofOffset) const {
auto itev = events.begin();
auto itev_end =
events.end(); // cache for speed
auto itev = events.cbegin();
auto itev_end = events.cend(); // cache for speed
// if tof < X[0], that means that you need to skip some events
while ((itev != itev_end) &&
......@@ -1987,7 +1982,7 @@ void EventList::histogramForWeightsHelper(const std::vector<T> &events,
if (events.size() > 0) {
// Iterate through all events (sorted by tof)
auto itev = findFirstEvent(events, X[0]);
auto itev_end = events.end();
auto itev_end = events.cend();
// The above can still take you to end() if no events above X[0], so check
// again.
if (itev == itev_end)
......@@ -2182,8 +2177,7 @@ void EventList::generateCountsHistogramPulseTime(const MantidVec &X,
// Iterate through all events (sorted by pulse time)
auto itev =
findFirstPulseEvent(this->events, X[0]);
std::vector<TofEvent>::const_iterator itev_end =
events.end(); // cache for speed
auto itev_end = events.cend(); // cache for speed
// The above can still take you to end() if no events above X[0], so check
// again.
if (itev == itev_end)
......@@ -2607,10 +2601,9 @@ template <class T>
void EventList::convertTofHelper(std::vector<T> &events, const double factor,
const double offset) {
// iterate through all events
typename std::vector<T>::iterator itev;
auto itev_end = events.end(); // cache for speed
for (itev = events.begin(); itev != itev_end; itev++)
itev->m_tof = itev->m_tof * factor + offset;
for (auto &event : events) {
event.m_tof = event.m_tof * factor + offset;
}
}
// --------------------------------------------------------------------------
......@@ -2639,10 +2632,9 @@ template <class T>
void EventList::addPulsetimeHelper(std::vector<T> &events,
const double seconds) {
// iterate through all events
typename std::vector<T>::iterator itev;
auto itev_end = events.end(); // cache for speed
for (itev = events.begin(); itev != itev_end; itev++)
itev->m_pulsetime += seconds;
for (auto &event : events) {
event.m_pulsetime += seconds;
}
}
// --------------------------------------------------------------------------
......@@ -2761,11 +2753,8 @@ void EventList::maskTof(const double tofMin, const double tofMax) {
template <class T>
void EventList::getTofsHelper(const std::vector<T> &events,
std::vector<double> &tofs) {
typename std::vector<T>::const_iterator itev;
auto itev_end =
events.end(); // cache for speed
tofs.clear();
for (itev = events.begin(); itev != itev_end; itev++)
for (auto itev = events.cbegin(); itev != events.cend(); ++itev)
tofs.push_back(itev->m_tof);
}
......@@ -2809,12 +2798,10 @@ std::vector<double> EventList::getTofs() const {
template <class T>
void EventList::getWeightsHelper(const std::vector<T> &events,
std::vector<double> &weights) {
typename std::vector<T>::const_iterator itev;
auto itev_end =
events.end(); // cache for speed
weights.clear();
for (itev = events.begin(); itev != itev_end; itev++)
weights.push_back(itev->weight());
for (const auto &event : events) {
weights.push_back(event.weight());
}
}
/** Fill a vector with the list of Weights
......@@ -2858,12 +2845,10 @@ std::vector<double> EventList::getWeights() const {
template <class T>
void EventList::getWeightErrorsHelper(const std::vector<T> &events,
std::vector<double> &weightErrors) {
typename std::vector<T>::const_iterator itev;
auto itev_end =
events.end(); // cache for speed
weightErrors.clear();
for (itev = events.begin(); itev != itev_end; itev++)
weightErrors.push_back(itev->error());
for (const auto &event : events) {
weightErrors.push_back(event.error());
}
}
/** Fill a vector with the list of Weight Errors
......@@ -2908,12 +2893,10 @@ template <class T>
void EventList::getPulseTimesHelper(
const std::vector<T> &events,
std::vector<Mantid::Kernel::DateAndTime> &times) {
typename std::vector<T>::const_iterator itev;
auto itev_end =
events.end(); // cache for speed
times.clear();
for (itev = events.begin(); itev != itev_end; itev++)
times.push_back(itev->pulseTime());
for (const auto &event : events) {
times.push_back(event.pulseTime());
}
}
/** Get the pulse times of each event in this EventList.
......@@ -3290,19 +3273,18 @@ void EventList::multiplyHelper(std::vector<T> &events, const double value,
double errorSquared = error * error;
double valueSquared = value * value;
typename std::vector<T>::iterator itev;
auto itev_end = events.end();
if (error == 0) {
// Error-less calculation
for (itev = events.begin(); itev != itev_end; itev++) {
for (auto itev = events.begin(); itev != itev_end; itev++) {
itev->m_errorSquared =
static_cast<float>(itev->m_errorSquared * valueSquared);
itev->m_weight *= static_cast<float>(value);
}
} else {
// Carry the scalar error
for (itev = events.begin(); itev != itev_end; itev++) {
for (auto itev = events.begin(); itev != itev_end; itev++) {
itev->m_errorSquared =
static_cast<float>(itev->m_errorSquared * valueSquared +
errorSquared * itev->m_weight * itev->m_weight);
......@@ -4548,11 +4530,9 @@ template <class T>
void EventList::convertUnitsQuicklyHelper(typename std::vector<T> &events,
const double &factor,
const double &power) {
auto itev = events.begin();
auto itev_end = events.end();
for (; itev != itev_end; itev++) {
for (auto &event : events) {
// Output unit = factor * (input) ^ power
itev->m_tof = factor * std::pow(itev->m_tof, power);
event.m_tof = factor * std::pow(event.m_tof, power);
}
}
......
......@@ -43,17 +43,15 @@ bool getIntersectionRegion(MatrixWorkspace_const_sptr outputWS,
yn_hi < verticalAxis.front() || yn_lo > verticalAxis.back())
return false;
auto start_it =
std::upper_bound(xAxis.begin(), xAxis.end(), xn_lo);
auto end_it =
std::upper_bound(xAxis.begin(), xAxis.end(), xn_hi);
auto start_it = std::upper_bound(xAxis.cbegin(), xAxis.cend(), xn_lo);
auto end_it = std::upper_bound(xAxis.cbegin(), xAxis.cend(), xn_hi);
x_start = 0;
x_end = xAxis.size() - 1;
if (start_it != xAxis.begin()) {
x_start = (start_it - xAxis.begin() - 1);
if (start_it != xAxis.cbegin()) {
x_start = (start_it - xAxis.cbegin() - 1);
}
if (end_it != xAxis.end()) {
x_end = end_it - xAxis.begin();
if (end_it != xAxis.cend()) {
x_end = end_it - xAxis.cbegin();
}
// Q region
......
......@@ -409,8 +409,7 @@ void MDBoxFlatTree::loadExperimentInfos(
std::map<std::string, std::string> entries;
file->getEntries(entries);
std::list<uint16_t> ExperimentBlockNum;
auto it = entries.begin();
for (; it != entries.end(); ++it) {
for (auto it = entries.begin(); it != entries.end(); ++it) {
std::string name = it->first;
if (boost::starts_with(name, "experiment")) {
try {
......
......@@ -197,8 +197,7 @@ bool MaskWorkspace::isMasked(const std::set<detid_t> &detectorIDs) const {
}
bool masked(true);
for (auto it = detectorIDs.begin();
it != detectorIDs.end(); ++it) {
for (auto it = detectorIDs.cbegin(); it != detectorIDs.cend(); ++it) {
if (!this->isMasked(*it)) {
masked = false;
break; // allows space for a debug print statement
......
......@@ -82,10 +82,8 @@ std::vector<Kernel::V3D> PeakShapeEllipsoid::getDirectionInSpecificFrame(
"compatible with the direction vector");
}
for (auto it = m_directions.begin();
it != m_directions.end(); ++it) {
for (auto it = m_directions.cbegin(); it != m_directions.cend(); ++it) {
directionsInFrame.push_back(invertedGoniometerMatrix * (*it));
Mantid::Kernel::V3D d = invertedGoniometerMatrix * (*it);
}
return directionsInFrame;
......
......@@ -34,10 +34,10 @@ TableWorkspace::TableWorkspace(const TableWorkspace &other)
: ITableWorkspace(other), m_rowCount(0), m_LogManager(new API::LogManager) {
setRowCount(other.m_rowCount);
auto it = other.m_columns.begin();
while (it != other.m_columns.end()) {
auto it = other.m_columns.cbegin();
while (it != other.m_columns.cend()) {
addColumn(boost::shared_ptr<API::Column>((*it)->clone()));
it++;
++it;
}
// copy logs/properties.
m_LogManager = boost::make_shared<API::LogManager>(*(other.m_LogManager));
......@@ -48,7 +48,7 @@ TableWorkspace::~TableWorkspace() {}
size_t TableWorkspace::getMemorySize() const {
size_t data_size = 0;
for (auto c = m_columns.begin(); c != m_columns.end(); c++) {
for (auto c = m_columns.cbegin(); c != m_columns.cend(); ++c) {
data_size += (*c)->sizeOfData();
}
data_size += m_LogManager->getMemorySize();
......@@ -118,9 +118,7 @@ API::Column_sptr TableWorkspace::getColumn(const std::string &name) {
/// Gets the shared pointer to a column.
API::Column_const_sptr
TableWorkspace::getColumn(const std::string &name) const {
auto c_it = m_columns.begin();
auto c_end = m_columns.end();
for (; c_it != c_end; c_it++) {
for (auto c_it = m_columns.cbegin(); c_it != m_columns.cend(); ++c_it) {
if (c_it->get()->name() == name) {
return *c_it;
}
......
......@@ -182,8 +182,7 @@ void Instrument::getDetectors(detid2det_map &out_map) const {
const detid2det_map &in_dets =
static_cast<const Instrument *>(m_base)->m_detectorCache;
// And turn them into parametrized versions
for (auto it = in_dets.begin();
it != in_dets.end(); ++it) {
for (auto it = in_dets.cbegin(); it != in_dets.cend(); ++it) {
out_map.insert(std::pair<detid_t, IDetector_sptr>(
it->first,
ParComponentFactory::createDetector(it->second.get(), m_map)));
......@@ -201,14 +200,12 @@ std::vector<detid_t> Instrument::getDetectorIDs(bool skipMonitors) const {
if (m_map) {
const detid2det_map &in_dets =
static_cast<const Instrument *>(m_base)->m_detectorCache;
for (auto it = in_dets.begin();
it != in_dets.end(); ++it)
for (auto it = in_dets.cbegin(); it != in_dets.cend(); ++it)
if (!skipMonitors || !it->second->isMonitor())
out.push_back(it->first);
} else {
const detid2det_map &in_dets = m_detectorCache;
for (auto it = in_dets.begin();
it != in_dets.end(); ++it)
for (auto it = in_dets.cbegin(); it != in_dets.cend(); ++it)
if (!skipMonitors || !it->second->isMonitor())
out.push_back(it->first);
}
......@@ -231,8 +228,7 @@ std::size_t Instrument::getNumberDetectors(bool skipMonitors) const {
if (m_map) {
const detid2det_map &in_dets =
static_cast<const Instrument *>(m_base)->m_detectorCache;
for (auto it = in_dets.begin();
it != in_dets.end(); ++it)
for (auto it = in_dets.cbegin(); it != in_dets.cend(); ++it)
if (it->second->isMonitor())
monitors += 1;
} else {
......@@ -509,8 +505,7 @@ bool Instrument::isMonitor(const std::set<detid_t> &detector_ids) const {
if (detector_ids.empty())
return false;
for (auto it = detector_ids.begin();
it != detector_ids.end(); ++it) {
for (auto it = detector_ids.cbegin(); it != detector_ids.cend(); ++it) {
if (this->isMonitor(*it))
return true;
}
......@@ -557,8 +552,7 @@ bool Instrument::isDetectorMasked(const std::set<detid_t> &detector_ids) const {
if (detector_ids.empty())
return false;
for (auto it = detector_ids.begin();
it != detector_ids.end(); ++it) {
for (auto it = detector_ids.cbegin(); it != detector_ids.cend(); ++it) {
if (!this->isDetectorMasked(*it))
return false;
}
......@@ -832,8 +826,7 @@ void Instrument::getBoundingBox(BoundingBox &assemblyBox) const {
m_cachedBoundingBox = new BoundingBox();
ComponentID sourceID = getSource()->getComponentID();
// Loop over the children and define a box large enough for all of them
for (auto it = m_children.begin(); it != m_children.end();
++it) {
for (auto it = m_children.cbegin(); it != m_children.cend(); ++it) {
BoundingBox compBox;
IComponent *component = *it;
if (component && component->getComponentID() != sourceID) {
......@@ -958,10 +951,9 @@ double Instrument::calcConversion(
const std::map<detid_t, double> &offsets) {
double factor = 0.;
double offset;
for (auto iter = detectors.begin();
iter != detectors.end(); ++iter) {
for (auto iter = detectors.cbegin(); iter != detectors.cend(); ++iter) {
auto off_iter = offsets.find(*iter);
if (off_iter != offsets.end()) {
if (off_iter != offsets.cend()) {
offset = offsets.find(*iter)->second;
} else {
offset = 0.;
......
......@@ -372,8 +372,7 @@ void CompAssembly::getBoundingBox(BoundingBox &assemblyBox) const {
if (!m_cachedBoundingBox) {
m_cachedBoundingBox = new BoundingBox();
// Loop over the children and define a box large enough for all of them
for (auto it = m_children.begin(); it != m_children.end();
++it) {
for (auto it = m_children.cbegin(); it != m_children.cend(); ++it) {
BoundingBox compBox;
if (*it) {
(*it)->getBoundingBox(compBox);
......
......@@ -353,8 +353,7 @@ std::string DetectorGroup::getParameterAsString(const std::string &pname,
void DetectorGroup::getBoundingBox(BoundingBox &boundingBox) const {
// boundingBox = BoundingBox(); // this change may modify a lot of behaviour
// -> verify
for (auto cit = m_detectors.begin();
cit != m_detectors.end(); ++cit) {
for (auto cit = m_detectors.cbegin(); cit != m_detectors.cend(); ++cit) {
BoundingBox memberBox;
if (!boundingBox.isAxisAligned()) {
// coordinate system
......
......@@ -1108,8 +1108,7 @@ void InstrumentDefinitionParser::appendAssembly(
InstrumentDefinitionParser::getParentComponent(pElem);
// check if this location is in the exclude list
auto it =
find(excludeList.begin(), excludeList.end(),
auto it = find(excludeList.cbegin(), excludeList.cend(),
InstrumentDefinitionParser::getNameOfLocationElement(
pElem, pParentElem));
if (it == excludeList.end()) {
......
......@@ -104,14 +104,14 @@ bool ParameterMap::operator==(const ParameterMap &rhs) const {
// asString method turns the ComponentIDs to full-qualified name identifiers
// so we will use the same approach to compare them
auto thisEnd = this->m_map.end();
auto rhsEnd = rhs.m_map.end();
auto thisEnd = this->m_map.cend();
auto rhsEnd = rhs.m_map.cend();
for (auto thisIt = this->m_map.begin(); thisIt != thisEnd; ++thisIt) {
const IComponent *comp = static_cast<IComponent *>(thisIt->first);
const std::string fullName = comp->getFullName();
const auto &param = thisIt->second;
bool match(false);
for (auto rhsIt = rhs.m_map.begin(); rhsIt != rhsEnd; ++rhsIt) {
for (auto rhsIt = rhs.m_map.cbegin(); rhsIt != rhsEnd; ++rhsIt) {
const IComponent *rhsComp = static_cast<IComponent *>(rhsIt->first);
const std::string rhsFullName = rhsComp->getFullName();
if (fullName == rhsFullName && (*param) == (*rhsIt->second)) {
......@@ -203,14 +203,14 @@ const std::string ParameterMap::diff(const ParameterMap &rhs,
// so we will use the same approach to compare them
std::stringstream strOutput;
auto thisEnd = this->m_map.end();
auto rhsEnd = rhs.m_map.end();
for (auto thisIt = this->m_map.begin(); thisIt != thisEnd; ++thisIt) {
auto thisEnd = this->m_map.cend();
auto rhsEnd = rhs.m_map.cend();
for (auto thisIt = this->m_map.cbegin(); thisIt != thisEnd; ++thisIt) {
const IComponent *comp = static_cast<IComponent *>(thisIt->first);
const std::string fullName = comp->getFullName();
const auto &param = thisIt->second;
bool match(false);
for (auto rhsIt = rhs.m_map.begin(); rhsIt != rhsEnd; ++rhsIt) {
for (auto rhsIt = rhs.m_map.cbegin(); rhsIt != rhsEnd; ++rhsIt) {
const IComponent *rhsComp = static_cast<IComponent *>(rhsIt->first);
const std::string rhsFullName = rhsComp->getFullName();
if (fullName == rhsFullName && (*param) == (*rhsIt->second)) {
......@@ -227,7 +227,7 @@ const std::string ParameterMap::diff(const ParameterMap &rhs,
<< " and value: " << (*param).asString() << std::endl;
bool componentWithSameNameRHS = false;
bool parameterWithSameNameRHS = false;
for (auto rhsIt = rhs.m_map.begin(); rhsIt != rhsEnd; ++rhsIt) {
for (auto rhsIt = rhs.m_map.cbegin(); rhsIt != rhsEnd; ++rhsIt) {
const IComponent *rhsComp = static_cast<IComponent *>(rhsIt->first);
const std::string rhsFullName = rhsComp->getFullName();
if (fullName == rhsFullName) {
......@@ -939,7 +939,7 @@ std::set<std::string> ParameterMap::names(const IComponent *comp) const {
*/
std::string ParameterMap::asString() const {
std::stringstream out;
for (auto it = m_map.begin(); it != m_map.end(); it++) {
for (auto it = m_map.cbegin(); it != m_map.cend(); ++it) {
boost::shared_ptr<Parameter> p = it->second;
if (p && it->first) {
const IComponent *comp = (const IComponent *)(it->first);
......
......@@ -64,8 +64,7 @@ bool MDGeometryBuilderXML<CheckDimensionPolicy>::addOrdinaryDimension(
template <typename CheckDimensionPolicy>
void MDGeometryBuilderXML<CheckDimensionPolicy>::addManyOrdinaryDimensions(
VecIMDDimension_sptr manyDims) const {
auto it = manyDims.begin();
for (; it != manyDims.end(); ++it) {
for (auto it = manyDims.begin(); it != manyDims.end(); ++it) {
addOrdinaryDimension(*it);
}
}
......@@ -205,9 +204,7 @@ const std::string &MDGeometryBuilderXML<CheckDimensionPolicy>::create() const {
// Loop through dimensions and generate xml for each.
std::string dimensionXMLString;
auto it = m_vecDimensions.begin();
for (; it != m_vecDimensions.end(); ++it) {
for (auto it = m_vecDimensions.begin(); it != m_vecDimensions.end(); ++it) {
dimensionXMLString += (*it)->toXMLString();
}
......
......@@ -177,7 +177,7 @@ std::string Algebra::writeMCNPX() const
for (int i = 0; i < lenOut; i++) {
if (islower(Out[i]) || isupper(Out[i])) {
auto vc = find_if(
SurfMap.begin(), SurfMap.end(),
SurfMap.cbegin(), SurfMap.cend(),
MapSupport::valEqual<int, std::string>(std::string(1, Out[i])));
if (vc == SurfMap.end()) {
std::cout << "SurfMap size == " << SurfMap.size() << std::endl;
......
......@@ -91,10 +91,9 @@ int BnId::operator==(const BnId &A) const
{
if (A.size != size || A.Tnum != Tnum || A.Znum != Znum)
return 0;
std::vector<int>::const_iterator vc;
auto ac = A.Tval.begin();
for (vc = Tval.begin(); vc != Tval.end(); ++vc, ++ac) {
if (ac == A.Tval.end()) // This should neve happen
auto ac = A.Tval.cbegin();
for (auto vc = Tval.cbegin(); vc != Tval.cend(); ++vc, ++ac) {
if (ac == A.Tval.cend()) // This should never happen
return 0;
if (*vc != *ac)
return 0;
......@@ -150,9 +149,9 @@ int BnId::operator<(const BnId &A) const
if (Tnum != A.Tnum)
return (Tnum < A.Tnum) ? 1 : 0;
auto tvc = Tval.rbegin();
auto avc = A.Tval.rbegin();
while (tvc != Tval.rend()) {
auto tvc = Tval.crbegin();
auto avc = A.Tval.crbegin();
while (tvc != Tval.crend()) {
if (*tvc != *avc)
return *tvc < *avc;
++tvc;
......@@ -318,10 +317,9 @@ std::pair<int, BnId> BnId::makeCombination(const BnId &A) const
int flag(0); // numb of diff
std::pair<int, int> Tcnt(0, 0); // this counter
std::pair<int, int> Acnt(0, 0); // A counter
std::vector<int>::const_iterator tvc;
auto avc = A.Tval.begin();
auto avc = A.Tval.cbegin();
std::vector<int>::const_iterator chpt; // change point
for (tvc = Tval.begin(); tvc != Tval.end(); ++tvc, ++avc) {
for (auto tvc = Tval.cbegin(); tvc != Tval.cend(); ++tvc, ++avc) {
if ((*avc * *tvc) < 0) // false/true
{
if (flag) // failed
......
......@@ -80,7 +80,7 @@ int Track::nonComplete() const {
if (m_links.size() < 2) {
return 0;
}
auto ac = m_links.begin();
auto ac = m_links.cbegin();
if (m_startPoint.distance(ac->entryPoint) > Tolerance) {
return 1;
}
......@@ -187,7 +187,7 @@ void Track::buildLink() {
// The surface points were added in order when they were built so no sorting
// is required here.
PType::const_iterator ac = m_surfPoints.begin();
auto ac = m_surfPoints.cbegin();
auto bc = ac;
++bc;
V3D workPt = m_startPoint; // last good point
......
......@@ -20,9 +20,7 @@ std::vector<std::string> CompositeValidator::allowedValues() const {
std::multiset<std::string> elem_all;