Commit 439329e8 authored by Shahroz Ahmed's avatar Shahroz Ahmed
Browse files

Merge branch 'master' of github.com:mantidproject/mantid into...

Merge branch 'master' of github.com:mantidproject/mantid into 14908_add_an_existingv_no_test_case_powderDiff_gem_sys_test
parents 5d6a54bb f6583045
......@@ -50,6 +50,11 @@ if ( ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
include ( DarwinSetup )
endif ()
###########################################################################
# Set working Python versions
###########################################################################
set ( Python_ADDITIONAL_VERSIONS 2.7 2.6 )
###########################################################################
# Cross-platform setup
###########################################################################
......@@ -137,11 +142,6 @@ add_dependencies ( check GUITests )
add_custom_target ( AllTests )
add_dependencies ( AllTests FrameworkTests GUITests )
if ( MSVC )
add_definitions ( -DQWT_DLL )
endif ()
add_subdirectory ( MantidQt )
if ( UNIX )
#Experimental feature. Unix only at this point.
set ( UNITY_BUILD OFF CACHE BOOL "Switch for utilising unity builds. Faster builds for selected components.")
......@@ -151,8 +151,11 @@ endif ( UNIX )
set ( MAKE_VATES OFF CACHE BOOL "Switch for compiling the Vates project")
if ( MAKE_VATES )
find_package( ParaView )
add_subdirectory ( Vates )
if(ParaView_FOUND)
add_definitions ( -DMAKE_VATES )
endif()
if (NOT APPLE)
LIST( APPEND CPACK_INSTALL_CMAKE_PROJECTS
"${ParaView_DIR}" "ParaView Runtime Libs" "Runtime" "${INBUNDLE}/"
......@@ -170,6 +173,11 @@ if ( MAKE_VATES )
endif ( MAKE_VATES )
if ( MSVC )
add_definitions ( -DQWT_DLL )
endif ()
add_subdirectory ( MantidQt )
add_subdirectory ( MantidPlot )
add_subdirectory ( scripts )
......@@ -243,7 +251,7 @@ if ( ENABLE_CPACK )
set ( CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES},python-ipython >= 1.1.0,python-ipython-notebook" )
# scipy & matplotlib
set ( CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES},scipy,python-matplotlib" )
set ( CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES},mxml,hdf,hdf5,jsoncpp" )
set ( CPACK_RPM_PACKAGE_REQUIRES "${CPACK_RPM_PACKAGE_REQUIRES},mxml,hdf,hdf5,jsoncpp >= 0.7.0" )
if( "${UNIX_CODENAME}" MATCHES "Santiago" )
# On RHEL6 we have to use an updated qscintilla to fix an auto complete bug
......@@ -279,7 +287,7 @@ if ( ENABLE_CPACK )
"python-sip,"
"python-qt4,"
"python-nxs (>= 4.3),"
"libjsoncpp0,"
"libjsoncpp0 (>=0.7.0),"
"libqscintilla2-11,"
"liboce-foundation8,liboce-modeling8,"
"libmuparser2,"
......@@ -290,8 +298,8 @@ if ( ENABLE_CPACK )
"libpocofoundation11,libpocoutil11,libpoconet11,libpoconetssl11,libpococrypto11,libpocoxml11" )
set ( PERFTOOLS_DEB_PACKAGE "libgoogle-perftools4 (>= 1.7)" )
if( "${UNIX_CODENAME}" STREQUAL "wily" OR "${UNIX_CODENAME}" STREQUAL "xenial")
list ( APPEND DEPENDS_LIST ", libnexus0v5 (>= 4.3),libjsoncpp0v5,libqscintilla2-12v5, libmuparser2v5,libqwtplot3d-qt4-0v5")
list (REMOVE_ITEM DEPENDS_LIST "libjsoncpp0," "libqscintilla2-11," "libmuparser2," "libnexus0 (>= 4.3)," "libqwtplot3d-qt4-0,")
list ( APPEND DEPENDS_LIST ", libnexus0v5 (>= 4.3),libjsoncpp0v5 (>= 0.7.0),libqscintilla2-12v5, libmuparser2v5,libqwtplot3d-qt4-0v5")
list (REMOVE_ITEM DEPENDS_LIST "libjsoncpp0 (>=0.7.0)," "libqscintilla2-11," "libmuparser2," "libnexus0 (>= 4.3)," "libqwtplot3d-qt4-0,")
endif()
# parse list to string required for deb package
string ( REPLACE ";" "" CPACK_DEBIAN_PACKAGE_DEPENDS ${DEPENDS_LIST} )
......
......@@ -32,6 +32,10 @@ template <class C, class N> class NObserver;
class Void;
}
namespace Json {
class Value;
}
namespace Mantid {
namespace API {
//----------------------------------------------------------------------
......@@ -273,6 +277,8 @@ public:
//@{
/// Serialize an object to a string
virtual std::string toString() const;
/// Serialize an object to a json object
::Json::Value toJson() const;
/// De-serialize an object from a string
static IAlgorithm_sptr fromString(const std::string &input);
/// Construct an object from a history entry
......@@ -400,6 +406,8 @@ private:
void reportCompleted(const double &duration,
const bool groupProcessing = false);
void registerFeatureUsage() const;
// --------------------- Private Members -----------------------------------
/// Poco::ActiveMethod used to implement asynchronous execution.
Poco::ActiveMethod<bool, Poco::Void, Algorithm,
......
......@@ -77,7 +77,6 @@ public:
/// Clear memory associated with the PropertyManagers
void clearPropertyManagers();
/// Creates and instance of an algorithm
IAlgorithm *createAlgorithm(const std::string &algName,
const int &version = -1);
......@@ -120,12 +119,12 @@ private:
void disableNexusOutput();
/// Starts asynchronous tasks that are done as part of Start-up
void AsynchronousStartupTasks();
/// Setup Usage Reporting if enabled
void setupUsageReporting();
/// Update instrument definitions from github
void UpdateInstrumentDefinitions();
/// check if a newer version of Mantid is available
void CheckIfNewerVersionIsAvailable();
/// Sends startup usage information
void SendStartupUsageInfo();
#ifdef MPI_BUILD
/** Member variable that initialises the MPI environment on construction (in
......
......@@ -65,9 +65,6 @@ public:
/// Refresh the cache (integrated signal of each box)
virtual void refreshCache() = 0;
/// Return true if there is any mask on the workspace
virtual bool hasMask() = 0;
/// Recurse down to a minimum depth
virtual void setMinRecursionDepth(size_t depth) = 0;
......
......@@ -76,9 +76,6 @@ public:
/// Returns the normalized error for this box
virtual signal_t getNormalizedError() const = 0;
/// Returns the normalized signal or mask value for this box
virtual signal_t getNormalizedSignalWithMask() const = 0;
/// Returns the total signal for this box
virtual signal_t getSignal() const = 0;
......
......@@ -264,13 +264,6 @@ public:
virtual uint32_t getDepth() const = 0;
virtual signal_t getSignalNormalized() const = 0;
virtual signal_t getSignalWithMask() const = 0;
virtual signal_t getSignalNormalizedWithMask() const = 0;
virtual signal_t getSignalByNEventsWithMask() const {
return this->getSignalWithMask() /
static_cast<signal_t>(this->getNPoints());
}
virtual void calcVolume() = 0;
virtual void setInverseVolume(const coord_t) = 0;
virtual void setSignal(const signal_t) = 0;
......
......@@ -33,7 +33,7 @@ enum MDNormalization {
NumEventsNormalization = 2
};
static const signal_t MDMaskValue = 0.0;
static const signal_t MDMaskValue = std::numeric_limits<double>::quiet_NaN();
/** Basic MD Workspace Abstract Class.
*
......@@ -119,6 +119,10 @@ public:
IMDIterator *
createIterator(Mantid::Geometry::MDImplicitFunction *function = NULL) const;
std::string getConvention() const;
void setConvention(std::string m_convention);
std::string changeQConvention();
signal_t getSignalAtVMD(const Mantid::Kernel::VMD &coords,
const Mantid::API::MDNormalization &normalization =
Mantid::API::VolumeNormalization) const;
......@@ -162,6 +166,7 @@ protected:
virtual const std::string toString() const;
private:
std::string m_convention;
virtual IMDWorkspace *doClone() const = 0;
};
......
......@@ -8,6 +8,7 @@
#include "MantidAPI/IPeaksWorkspace_fwd.h"
#include "MantidAPI/ITableWorkspace.h"
#include "MantidKernel/SpecialCoordinateSystem.h"
#include "MantidKernel/ConfigService.h"
#include <boost/optional.hpp>
namespace Mantid {
......@@ -48,7 +49,9 @@ class MANTID_API_DLL IPeaksWorkspace : public ITableWorkspace,
public Mantid::API::ExperimentInfo {
public:
/// Ctor
IPeaksWorkspace() : ITableWorkspace(), ExperimentInfo() {}
IPeaksWorkspace() : ITableWorkspace(), ExperimentInfo() {
convention = Kernel::ConfigService::Instance().getString("Q.convention");
}
/// Destructor
virtual ~IPeaksWorkspace();
......@@ -61,6 +64,11 @@ public:
*/
virtual int getNumberPeaks() const = 0;
//---------------------------------------------------------------------------------------------
/** @return the number of peaks
*/
virtual std::string getConvention() const = 0;
//---------------------------------------------------------------------------------------------
/** Removes the indicated peak
* @param peakNum the peak to remove. peakNum starts at 0
......@@ -152,6 +160,8 @@ public:
peakInfo(Kernel::V3D QFrame, bool labCoords) const = 0;
virtual int peakInfoNumber(Kernel::V3D qLabFrame, bool labCoords) const = 0;
std::string convention;
protected:
/// Protected copy constructor. May be used by childs for cloning.
IPeaksWorkspace(const IPeaksWorkspace &other)
......
......@@ -56,8 +56,6 @@ public:
virtual signal_t getNormalizedError() const;
virtual signal_t getNormalizedSignalWithMask() const;
virtual signal_t getSignal() const;
virtual signal_t getError() const;
......
......@@ -11,11 +11,13 @@
#include "MantidAPI/IWorkspaceProperty.h"
#include "MantidAPI/WorkspaceGroup.h"
#include "MantidKernel/ConfigService.h"
#include "MantidKernel/EmptyValues.h"
#include "MantidKernel/DateAndTime.h"
#include "MantidKernel/MultiThreaded.h"
#include "MantidKernel/Strings.h"
#include "MantidKernel/Timer.h"
#include "MantidKernel/UsageService.h"
#include <boost/algorithm/string/regex.hpp>
#include <boost/weak_ptr.hpp>
......@@ -202,15 +204,11 @@ void Algorithm::progress(double p, const std::string &msg, double estimatedTime,
//---------------------------------------------------------------------------------------------
/// Function to return all of the categories that contain this algorithm
const std::vector<std::string> Algorithm::categories() const {
std::vector<std::string> res;
Poco::StringTokenizer tokenizer(category(), categorySeparator(),
Poco::StringTokenizer::TOK_TRIM |
Poco::StringTokenizer::TOK_IGNORE_EMPTY);
Poco::StringTokenizer::Iterator h = tokenizer.begin();
for (; h != tokenizer.end(); ++h) {
res.push_back(*h);
}
std::vector<std::string> res(tokenizer.begin(), tokenizer.end());
const DeprecatedAlgorithm *depo =
dynamic_cast<const DeprecatedAlgorithm *>(this);
......@@ -584,11 +582,11 @@ bool Algorithm::execute() {
Timer timer;
// Call the concrete algorithm's exec method
this->exec();
registerFeatureUsage();
// Check for a cancellation request in case the concrete algorithm doesn't
interruption_point();
// Get how long this algorithm took to run
const float duration = timer.elapsed();
// need it to throw before trying to run fillhistory() on an algorithm
// which has failed
if (trackingHistory() && m_history) {
......@@ -819,19 +817,27 @@ Algorithm_sptr Algorithm::createChildAlgorithm(const std::string &name,
/**
* Serialize this object to a string. The format is
* AlgorithmName.version(prop1=value1,prop2=value2,...)
* a json formatted string.
* @returns This object serialized as a string
*/
std::string Algorithm::toString() const {
::Json::Value root;
::Json::FastWriter writer;
::Json::Reader reader;
return writer.write(toJson());
}
/**
* Serialize this object to a json object)
* @returns This object serialized as a json object
*/
::Json::Value Algorithm::toJson() const {
::Json::Value root;
root["name"] = name();
root["version"] = this->version();
root["properties"] = Kernel::PropertyManagerOwner::asJson(false);
return writer.write(root);
return root;
}
//--------------------------------------------------------------------------------------------
......@@ -1566,6 +1572,17 @@ void Algorithm::reportCompleted(const double &duration,
m_running = false;
}
/** Registers the usage of the algorithm with the UsageService
*/
void Algorithm::registerFeatureUsage() const {
if (UsageService::Instance().isEnabled()) {
std::ostringstream oss;
oss << this->name() << ".v" << this->version();
UsageService::Instance().registerFeatureUsage("Algorithm", oss.str(),
isChild());
}
}
/** Enable or disable Logging of start and end messages
@param enabled : true to enable logging, false to disable
*/
......
......@@ -39,7 +39,7 @@ AlgorithmFactoryImpl::create(const std::string &name,
if (version < 0) {
if (version == -1) // get latest version since not supplied
{
VersionMap::const_iterator it = m_vmap.find(name);
auto it = m_vmap.find(name);
if (!name.empty()) {
if (it == m_vmap.end())
throw std::runtime_error("Algorithm not registered " + name);
......@@ -53,7 +53,7 @@ AlgorithmFactoryImpl::create(const std::string &name,
try {
return this->createAlgorithm(name, local_version);
} catch (Kernel::Exception::NotFoundError &) {
VersionMap::const_iterator it = m_vmap.find(name);
auto it = m_vmap.find(name);
if (it == m_vmap.end())
throw std::runtime_error("algorithm not registered " + name);
else {
......@@ -79,7 +79,7 @@ void AlgorithmFactoryImpl::unsubscribe(const std::string &algorithmName,
try {
Kernel::DynamicFactory<Algorithm>::unsubscribe(key);
// Update version map accordingly
VersionMap::iterator it = m_vmap.find(algorithmName);
auto it = m_vmap.find(algorithmName);
if (it != m_vmap.end()) {
int highest_version = it->second;
if (highest_version > 1 &&
......@@ -223,7 +223,7 @@ AlgorithmFactoryImpl::getKeys(bool includeHidden) const {
*/
int AlgorithmFactoryImpl::highestVersion(
const std::string &algorithmName) const {
VersionMap::const_iterator viter = m_vmap.find(algorithmName);
auto viter = m_vmap.find(algorithmName);
if (viter != m_vmap.end())
return viter->second;
else {
......@@ -394,11 +394,8 @@ void AlgorithmFactoryImpl::fillHiddenCategories(
Poco::StringTokenizer tokenizer(categoryString, ";",
Poco::StringTokenizer::TOK_TRIM |
Poco::StringTokenizer::TOK_IGNORE_EMPTY);
Poco::StringTokenizer::Iterator h = tokenizer.begin();
for (; h != tokenizer.end(); ++h) {
categorySet->insert(*h);
}
std::copy(tokenizer.begin(), tokenizer.end(),
std::inserter(*categorySet, categorySet->end()));
}
/** Extract the name of an algorithm
......
......@@ -169,7 +169,7 @@ AlgorithmHistory::getChildAlgorithmHistory(const size_t index) const {
throw std::out_of_range(
"AlgorithmHistory::getAlgorithmHistory() - Index out of range");
}
AlgorithmHistories::const_iterator start = m_childHistories.begin();
auto start = m_childHistories.cbegin();
std::advance(start, index);
return *start;
}
......@@ -273,11 +273,9 @@ void AlgorithmHistory::saveNexus(::NeXus::File *file, int &algCount) const {
file->writeData("data", algData.str());
// child algorithms
AlgorithmHistories::const_iterator histIter = m_childHistories.begin();
for (; histIter != m_childHistories.end(); ++histIter) {
(*histIter)->saveNexus(file, algCount);
for (auto &history : m_childHistories) {
history->saveNexus(file, algCount);
}
file->closeGroup();
}
......
......@@ -149,8 +149,7 @@ void AlgorithmManagerImpl::setMaxAlgorithms(int n) {
*/
IAlgorithm_sptr AlgorithmManagerImpl::getAlgorithm(AlgorithmID id) const {
Mutex::ScopedLock _lock(this->m_managedMutex);
for (std::deque<IAlgorithm_sptr>::const_iterator a = m_managed_algs.begin();
a != m_managed_algs.end(); ++a) {
for (auto a = m_managed_algs.cbegin(); a != m_managed_algs.cend(); ++a) {
if ((**a).getAlgorithmID() == id)
return *a;
}
......
......@@ -148,8 +148,8 @@ void AlgorithmProxy::addObserver(const Poco::AbstractObserver &observer) const {
*/
void AlgorithmProxy::removeObserver(
const Poco::AbstractObserver &observer) const {
std::vector<const Poco::AbstractObserver *>::iterator o = std::find(
m_externalObservers.begin(), m_externalObservers.end(), &observer);
auto o = std::find(m_externalObservers.begin(), m_externalObservers.end(),
&observer);
if (o != m_externalObservers.end())
m_externalObservers.erase(o);
if (m_alg)
......@@ -282,9 +282,8 @@ void AlgorithmProxy::dropWorkspaceReferences() {
void AlgorithmProxy::addObservers() {
if (!m_alg)
return;
std::vector<const Poco::AbstractObserver *>::reverse_iterator o =
m_externalObservers.rbegin();
for (; o != m_externalObservers.rend(); ++o)
for (auto o = m_externalObservers.rbegin(); o != m_externalObservers.rend();
++o)
m_alg->addObserver(**o);
m_externalObservers.clear();
}
......@@ -310,15 +309,11 @@ std::string AlgorithmProxy::toString() const {
/// Function to return all of the categories that contain this algorithm
const std::vector<std::string> AlgorithmProxy::categories() const {
std::vector<std::string> res;
Poco::StringTokenizer tokenizer(category(), categorySeparator(),
Poco::StringTokenizer::TOK_TRIM |
Poco::StringTokenizer::TOK_IGNORE_EMPTY);
Poco::StringTokenizer::Iterator h = tokenizer.begin();
for (; h != tokenizer.end(); ++h) {
res.push_back(*h);
}
std::vector<std::string> res(tokenizer.begin(), tokenizer.end());
const DeprecatedAlgorithm *depo =
dynamic_cast<const DeprecatedAlgorithm *>(this);
......
......@@ -33,10 +33,8 @@ CompositeDomainMD::CompositeDomainMD(IMDWorkspace_const_sptr ws,
* Destructor.
*/
CompositeDomainMD::~CompositeDomainMD() {
std::vector<FunctionDomainMD *>::iterator it = m_domains.begin();
for (; it != m_domains.end(); ++it) {
delete *it;
}
for (auto domain : m_domains)
delete domain;
}
/// Return i-th domain reset to its start.
......
......@@ -419,8 +419,7 @@ void CompositeFunction::removeFunction(size_t i) {
}
// Shift down the function indeces for parameters
for (std::vector<size_t>::iterator it = m_IFunction.begin();
it != m_IFunction.end();) {
for (auto it = m_IFunction.begin(); it != m_IFunction.end();) {
if (*it == i) {
it = m_IFunction.erase(it);
......@@ -475,8 +474,7 @@ void CompositeFunction::replaceFunction(size_t i, IFunction_sptr f) {
// Modify function indeces: The new function may have different number of
// parameters
{
std::vector<size_t>::iterator itFun =
std::find(m_IFunction.begin(), m_IFunction.end(), i);
auto itFun = std::find(m_IFunction.begin(), m_IFunction.end(), i);
if (itFun != m_IFunction.end()) // functions must have at least 1 parameter
{
if (np_old > np_new) {
......
......@@ -50,7 +50,7 @@ CoordTransform::applyVMD(const Mantid::Kernel::VMD &inputVector) const {
if (inputVector.getNumDims() != inD)
throw std::runtime_error("CoordTransform::apply(): inputVector has the "
"wrong number of coordinates!");
coord_t *outArray = new coord_t[outD];
auto outArray = new coord_t[outD];
this->apply(inputVector.getBareArray(), outArray);
VMD out(outD, outArray);
delete[] outArray;
......
......@@ -83,7 +83,7 @@ void ExperimentInfo::copyExperimentInfoFrom(const ExperimentInfo *other) {
/** Clone this ExperimentInfo class into a new one
*/
ExperimentInfo *ExperimentInfo::cloneExperimentInfo() const {
ExperimentInfo *out = new ExperimentInfo();
auto out = new ExperimentInfo();
out->copyExperimentInfoFrom(this);
return out;
}
......@@ -1138,10 +1138,9 @@ void ExperimentInfo::readParameterMap(const std::string &parameterStr) {
options += Poco::StringTokenizer::TOK_TRIM;
Poco::StringTokenizer splitter(parameterStr, "|", options);
Poco::StringTokenizer::Iterator iend = splitter.end();
auto iend = splitter.end();
// std::string prev_name;
for (Poco::StringTokenizer::Iterator itr = splitter.begin(); itr != iend;
++itr) {
for (auto itr = splitter.begin(); itr != iend; ++itr) {
Poco::StringTokenizer tokens(*itr, ";");
if (tokens.count() < 4)
continue;
......
......@@ -71,7 +71,7 @@ void Expression::add_operators(const std::vector<std::string> &ops) {
char j = 0;
tokenizer tkz(m_operators->binary[i], " ",
tokenizer::TOK_IGNORE_EMPTY | tokenizer::TOK_TRIM);
for (tokenizer::Iterator it = tkz.begin(); it != tkz.end(); it++) {
for (auto it = tkz.begin(); it != tkz.end(); it++) {
m_operators->precedence[*it] = i + 1;
m_operators->op_number[*it] = j++;
}
......@@ -90,9 +90,8 @@ void Expression::add_operators(const std::vector<std::string> &ops) {
void Expression::add_unary(const std::set<std::string> &ops) {
m_operators->unary = ops;
for (std::set<std::string>::const_iterator it = ops.begin(); it != ops.end();
++it) {
for (std::string::const_iterator c = it->begin(); c != it->end(); ++c) {
for (auto it = ops.cbegin(); it != ops.cend(); ++it) {
for (auto c = it->cbegin(); c != it->cend(); ++c) {
m_operators->symbols.insert(*c);
}
}
......@@ -499,7 +498,7 @@ std::set<std::string> Expression::getVariables() const {
out.insert(s);
}
} else {
for (iterator e = begin(); e != end(); ++e) {
for (auto e = begin(); e != end(); ++e) {
if (e->isFunct()) {
std::set<std::string> tout = e->getVariables();
out.insert(tout.begin(), tout.end());
......@@ -521,9 +520,8 @@ void Expression::renameAll(const std::string &oldName,
if (!isFunct() && name() == oldName) {
rename(newName);
} else {
std::vector<Expression>::iterator e = m_terms.begin();
for (; e != m_terms.end(); ++e) {
e->renameAll(oldName, newName);
for (auto &term : m_terms) {
term.renameAll(oldName, newName);
}
}
}
......
......@@ -126,8 +126,7 @@ std::string FileFinderImpl::getFullPath(const std::string &filename,
const std::vector<std::string> &searchPaths =
Kernel::ConfigService::Instance().getDataSearchDirs();
std::vector<std::string>::const_iterator it = searchPaths.begin();
for (; it != searchPaths.end(); ++it) {
for (auto it = searchPaths.cbegin(); it != searchPaths.cend(); ++it) {
// On windows globbing is note working properly with network drives
// for example a network drive containing a $
// For this reason, and since windows is case insensitive anyway
......@@ -479,9 +478,8 @@ FileFinderImpl::findRun(const std::string &hintstr,
tolower);
if (!archiveOpt.empty() && archiveOpt != "off" &&
!facility.archiveSearch().empty()) {
std::vector<std::string>::const_iterator it =
facility.archiveSearch().begin();
for (; it != facility.archiveSearch().end(); ++it) {
for (auto it = facility.archiveSearch().cbegin();
it != facility.archiveSearch().cend(); ++it) {
g_log.debug() << "get archive search for the facility..." << *it
<< "\n";
archs.push_back(ArchiveSearchFactory::Instance().create(*it));
......@@ -602,7 +600,7 @@ FileFinderImpl::findRuns(const std::string &hintstr) const {
Poco::StringTokenizer hints(hint, ",",
Poco::StringTokenizer::TOK_TRIM |
Poco::StringTokenizer::TOK_IGNORE_EMPTY);
Poco::StringTokenizer::Iterator h = hints.begin();
auto h = hints.begin();
for (; h != hints.end(); ++h) {
// Quick check for a filename
......@@ -686,8 +684,7 @@ FileFinderImpl::getArchivePath(const std::vector<IArchiveSearch_sptr> &archs,
const std::set<std::string> &filenames,
const std::vector<std::string> &exts) const {
std::string path = "";
std::vector<IArchiveSearch_sptr>::const_iterator it = archs.begin();
for (; it != archs.end(); ++it) {
for (auto it = archs.cbegin(); it != archs.cend(); ++it) {
try {
path = (*it)->getArchivePath(filenames, exts);
if (!path.empty()) {
......@@ -750,9 +747,8 @@ FileFinderImpl::getPath(const std::vector<IArchiveSearch_sptr> &archs,
}
}