Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
1473c74e
Commit
1473c74e
authored
Dec 11, 2015
by
Hahn, Steven
Browse files
Refs #14764. Ran clang-tidy on Mantid Framework.
parent
4759f476
Changes
277
Hide whitespace changes
Inline
Side-by-side
Framework/API/src/Algorithm.cpp
View file @
1473c74e
...
...
@@ -206,7 +206,7 @@ const std::vector<std::string> Algorithm::categories() const {
Poco
::
StringTokenizer
tokenizer
(
category
(),
categorySeparator
(),
Poco
::
StringTokenizer
::
TOK_TRIM
|
Poco
::
StringTokenizer
::
TOK_IGNORE_EMPTY
);
Poco
::
StringTokenizer
::
Iter
ato
r
h
=
tokenizer
.
begin
();
a
u
to
h
=
tokenizer
.
begin
();
for
(;
h
!=
tokenizer
.
end
();
++
h
)
{
res
.
push_back
(
*
h
);
...
...
Framework/API/src/AlgorithmFactory.cpp
View file @
1473c74e
...
...
@@ -39,7 +39,7 @@ AlgorithmFactoryImpl::create(const std::string &name,
if
(
version
<
0
)
{
if
(
version
==
-
1
)
// get latest version since not supplied
{
VersionMap
::
const_iter
ato
r
it
=
m_vmap
.
find
(
name
);
a
u
to
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_iter
ato
r
it
=
m_vmap
.
find
(
name
);
a
u
to
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
::
iter
ato
r
it
=
m_vmap
.
find
(
algorithmName
);
a
u
to
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_iter
ato
r
viter
=
m_vmap
.
find
(
algorithmName
);
a
u
to
viter
=
m_vmap
.
find
(
algorithmName
);
if
(
viter
!=
m_vmap
.
end
())
return
viter
->
second
;
else
{
...
...
@@ -394,7 +394,7 @@ void AlgorithmFactoryImpl::fillHiddenCategories(
Poco
::
StringTokenizer
tokenizer
(
categoryString
,
";"
,
Poco
::
StringTokenizer
::
TOK_TRIM
|
Poco
::
StringTokenizer
::
TOK_IGNORE_EMPTY
);
Poco
::
StringTokenizer
::
Iter
ato
r
h
=
tokenizer
.
begin
();
a
u
to
h
=
tokenizer
.
begin
();
for
(;
h
!=
tokenizer
.
end
();
++
h
)
{
categorySet
->
insert
(
*
h
);
...
...
Framework/API/src/AlgorithmHistory.cpp
View file @
1473c74e
...
...
@@ -169,7 +169,7 @@ AlgorithmHistory::getChildAlgorithmHistory(const size_t index) const {
throw
std
::
out_of_range
(
"AlgorithmHistory::getAlgorithmHistory() - Index out of range"
);
}
AlgorithmHistories
::
const_iter
ato
r
start
=
m_childHistories
.
begin
();
a
u
to
start
=
m_childHistories
.
begin
();
std
::
advance
(
start
,
index
);
return
*
start
;
}
...
...
@@ -273,7 +273,7 @@ void AlgorithmHistory::saveNexus(::NeXus::File *file, int &algCount) const {
file
->
writeData
(
"data"
,
algData
.
str
());
// child algorithms
AlgorithmHistories
::
const_iter
ato
r
histIter
=
m_childHistories
.
begin
();
a
u
to
histIter
=
m_childHistories
.
begin
();
for
(;
histIter
!=
m_childHistories
.
end
();
++
histIter
)
{
(
*
histIter
)
->
saveNexus
(
file
,
algCount
);
}
...
...
Framework/API/src/AlgorithmManager.cpp
View file @
1473c74e
...
...
@@ -149,7 +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
();
for
(
auto
a
=
m_managed_algs
.
begin
();
a
!=
m_managed_algs
.
end
();
++
a
)
{
if
((
**
a
).
getAlgorithmID
()
==
id
)
return
*
a
;
...
...
Framework/API/src/AlgorithmProxy.cpp
View file @
1473c74e
...
...
@@ -148,7 +148,7 @@ void AlgorithmProxy::addObserver(const Poco::AbstractObserver &observer) const {
*/
void
AlgorithmProxy
::
removeObserver
(
const
Poco
::
AbstractObserver
&
observer
)
const
{
std
::
vector
<
const
Poco
::
AbstractObserver
*>::
iter
ato
r
o
=
std
::
find
(
a
u
to
o
=
std
::
find
(
m_externalObservers
.
begin
(),
m_externalObservers
.
end
(),
&
observer
);
if
(
o
!=
m_externalObservers
.
end
())
m_externalObservers
.
erase
(
o
);
...
...
@@ -282,7 +282,7 @@ void AlgorithmProxy::dropWorkspaceReferences() {
void
AlgorithmProxy
::
addObservers
()
{
if
(
!
m_alg
)
return
;
std
::
vector
<
const
Poco
::
AbstractObserver
*>::
reverse_iter
ato
r
o
=
a
u
to
o
=
m_externalObservers
.
rbegin
();
for
(;
o
!=
m_externalObservers
.
rend
();
++
o
)
m_alg
->
addObserver
(
**
o
);
...
...
@@ -314,7 +314,7 @@ const std::vector<std::string> AlgorithmProxy::categories() const {
Poco
::
StringTokenizer
tokenizer
(
category
(),
categorySeparator
(),
Poco
::
StringTokenizer
::
TOK_TRIM
|
Poco
::
StringTokenizer
::
TOK_IGNORE_EMPTY
);
Poco
::
StringTokenizer
::
Iter
ato
r
h
=
tokenizer
.
begin
();
a
u
to
h
=
tokenizer
.
begin
();
for
(;
h
!=
tokenizer
.
end
();
++
h
)
{
res
.
push_back
(
*
h
);
...
...
Framework/API/src/CompositeDomainMD.cpp
View file @
1473c74e
...
...
@@ -33,7 +33,7 @@ CompositeDomainMD::CompositeDomainMD(IMDWorkspace_const_sptr ws,
* Destructor.
*/
CompositeDomainMD
::~
CompositeDomainMD
()
{
std
::
vector
<
FunctionDomainMD
*>::
iterator
it
=
m_domains
.
begin
();
auto
it
=
m_domains
.
begin
();
for
(;
it
!=
m_domains
.
end
();
++
it
)
{
delete
*
it
;
}
...
...
Framework/API/src/CompositeFunction.cpp
View file @
1473c74e
...
...
@@ -419,7 +419,7 @@ void CompositeFunction::removeFunction(size_t i) {
}
// Shift down the function indeces for parameters
for
(
std
::
vector
<
size_t
>::
iter
ato
r
it
=
m_IFunction
.
begin
();
for
(
a
u
to
it
=
m_IFunction
.
begin
();
it
!=
m_IFunction
.
end
();)
{
if
(
*
it
==
i
)
{
...
...
@@ -475,7 +475,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
>::
iter
ato
r
itFun
=
a
u
to
itFun
=
std
::
find
(
m_IFunction
.
begin
(),
m_IFunction
.
end
(),
i
);
if
(
itFun
!=
m_IFunction
.
end
())
// functions must have at least 1 parameter
{
...
...
Framework/API/src/CoordTransform.cpp
View file @
1473c74e
...
...
@@ -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
;
...
...
Framework/API/src/ExperimentInfo.cpp
View file @
1473c74e
...
...
@@ -83,7 +83,7 @@ void ExperimentInfo::copyExperimentInfoFrom(const ExperimentInfo *other) {
/** Clone this ExperimentInfo class into a new one
*/
ExperimentInfo
*
ExperimentInfo
::
cloneExperimentInfo
()
const
{
ExperimentInf
o
*
out
=
new
ExperimentInfo
();
aut
o
out
=
new
ExperimentInfo
();
out
->
copyExperimentInfoFrom
(
this
);
return
out
;
}
...
...
@@ -1138,9 +1138,9 @@ void ExperimentInfo::readParameterMap(const std::string ¶meterStr) {
options
+=
Poco
::
StringTokenizer
::
TOK_TRIM
;
Poco
::
StringTokenizer
splitter
(
parameterStr
,
"|"
,
options
);
Poco
::
StringTokenizer
::
Iter
ato
r
iend
=
splitter
.
end
();
a
u
to
iend
=
splitter
.
end
();
// std::string prev_name;
for
(
Poco
::
StringTokenizer
::
Iter
ato
r
itr
=
splitter
.
begin
();
itr
!=
iend
;
for
(
a
u
to
itr
=
splitter
.
begin
();
itr
!=
iend
;
++
itr
)
{
Poco
::
StringTokenizer
tokens
(
*
itr
,
";"
);
if
(
tokens
.
count
()
<
4
)
...
...
Framework/API/src/Expression.cpp
View file @
1473c74e
...
...
@@ -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
::
Iter
ato
r
it
=
tkz
.
begin
();
it
!=
tkz
.
end
();
it
++
)
{
for
(
a
u
to
it
=
tkz
.
begin
();
it
!=
tkz
.
end
();
it
++
)
{
m_operators
->
precedence
[
*
it
]
=
i
+
1
;
m_operators
->
op_number
[
*
it
]
=
j
++
;
}
...
...
@@ -90,7 +90,7 @@ 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_iter
ato
r
it
=
ops
.
begin
();
it
!=
ops
.
end
();
for
(
a
u
to
it
=
ops
.
begin
();
it
!=
ops
.
end
();
++
it
)
{
for
(
std
::
string
::
const_iterator
c
=
it
->
begin
();
c
!=
it
->
end
();
++
c
)
{
m_operators
->
symbols
.
insert
(
*
c
);
...
...
@@ -499,7 +499,7 @@ std::set<std::string> Expression::getVariables() const {
out
.
insert
(
s
);
}
}
else
{
for
(
iter
ato
r
e
=
begin
();
e
!=
end
();
++
e
)
{
for
(
a
u
to
e
=
begin
();
e
!=
end
();
++
e
)
{
if
(
e
->
isFunct
())
{
std
::
set
<
std
::
string
>
tout
=
e
->
getVariables
();
out
.
insert
(
tout
.
begin
(),
tout
.
end
());
...
...
@@ -521,7 +521,7 @@ void Expression::renameAll(const std::string &oldName,
if
(
!
isFunct
()
&&
name
()
==
oldName
)
{
rename
(
newName
);
}
else
{
std
::
vector
<
Expression
>::
iter
ato
r
e
=
m_terms
.
begin
();
a
u
to
e
=
m_terms
.
begin
();
for
(;
e
!=
m_terms
.
end
();
++
e
)
{
e
->
renameAll
(
oldName
,
newName
);
}
...
...
Framework/API/src/FileFinder.cpp
View file @
1473c74e
...
...
@@ -126,7 +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_iter
ato
r
it
=
searchPaths
.
begin
();
a
u
to
it
=
searchPaths
.
begin
();
for
(;
it
!=
searchPaths
.
end
();
++
it
)
{
// On windows globbing is note working properly with network drives
// for example a network drive containing a $
...
...
@@ -479,7 +479,7 @@ FileFinderImpl::findRun(const std::string &hintstr,
tolower
);
if
(
!
archiveOpt
.
empty
()
&&
archiveOpt
!=
"off"
&&
!
facility
.
archiveSearch
().
empty
())
{
std
::
vector
<
std
::
string
>::
const_iter
ato
r
it
=
a
u
to
it
=
facility
.
archiveSearch
().
begin
();
for
(;
it
!=
facility
.
archiveSearch
().
end
();
++
it
)
{
g_log
.
debug
()
<<
"get archive search for the facility..."
<<
*
it
...
...
@@ -602,7 +602,7 @@ FileFinderImpl::findRuns(const std::string &hintstr) const {
Poco
::
StringTokenizer
hints
(
hint
,
","
,
Poco
::
StringTokenizer
::
TOK_TRIM
|
Poco
::
StringTokenizer
::
TOK_IGNORE_EMPTY
);
Poco
::
StringTokenizer
::
Iter
ato
r
h
=
hints
.
begin
();
a
u
to
h
=
hints
.
begin
();
for
(;
h
!=
hints
.
end
();
++
h
)
{
// Quick check for a filename
...
...
@@ -686,7 +686,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
();
auto
it
=
archs
.
begin
();
for
(;
it
!=
archs
.
end
();
++
it
)
{
try
{
path
=
(
*
it
)
->
getArchivePath
(
filenames
,
exts
);
...
...
@@ -751,7 +751,7 @@ FileFinderImpl::getPath(const std::vector<IArchiveSearch_sptr> &archs,
}
for
(
auto
ext
=
extensions
.
begin
();
ext
!=
extensions
.
end
();
++
ext
)
{
std
::
set
<
std
::
string
>::
const_iter
ato
r
it
=
filenames
.
begin
();
a
u
to
it
=
filenames
.
begin
();
for
(;
it
!=
filenames
.
end
();
++
it
)
{
path
=
getFullPath
(
*
it
+
*
ext
);
try
{
...
...
Framework/API/src/FileProperty.cpp
View file @
1473c74e
...
...
@@ -227,9 +227,9 @@ bool FileProperty::extsMatchRunFiles() {
Kernel
::
FacilityInfo
facilityInfo
=
Kernel
::
ConfigService
::
Instance
().
getFacility
();
const
std
::
vector
<
std
::
string
>
facilityExts
=
facilityInfo
.
extensions
();
std
::
vector
<
std
::
string
>::
const_iter
ato
r
facilityExtsBegin
=
a
u
to
facilityExtsBegin
=
facilityExts
.
begin
();
std
::
vector
<
std
::
string
>::
const_iter
ato
r
facilityExtsEnd
=
a
u
to
facilityExtsEnd
=
facilityExts
.
end
();
const
std
::
vector
<
std
::
string
>
allowedExts
=
this
->
allowedValues
();
...
...
Framework/API/src/FunctionFactory.cpp
View file @
1473c74e
...
...
@@ -83,7 +83,7 @@ IFunction_sptr FunctionFactoryImpl::createSimple(
}
const
std
::
vector
<
Expression
>
&
terms
=
expr
.
terms
();
std
::
vector
<
Expression
>::
const_iter
ato
r
term
=
terms
.
begin
();
a
u
to
term
=
terms
.
begin
();
if
(
term
->
name
()
!=
"="
)
inputError
(
expr
.
str
());
...
...
@@ -146,7 +146,7 @@ CompositeFunction_sptr FunctionFactoryImpl::createComposite(
}
const
std
::
vector
<
Expression
>
&
terms
=
expr
.
terms
();
std
::
vector
<
Expression
>::
const_iter
ato
r
it
=
terms
.
begin
();
a
u
to
it
=
terms
.
begin
();
const
Expression
&
term
=
it
->
bracketsRemoved
();
CompositeFunction_sptr
cfun
;
...
...
@@ -166,7 +166,7 @@ CompositeFunction_sptr FunctionFactoryImpl::createComposite(
inputError
(
expr
.
str
());
}
}
else
if
(
term
.
name
()
==
","
)
{
std
::
vector
<
Expression
>::
const_iter
ato
r
firstTerm
=
term
.
terms
().
begin
();
a
u
to
firstTerm
=
term
.
terms
().
begin
();
if
(
firstTerm
->
name
()
==
"="
)
{
if
(
firstTerm
->
terms
()[
0
].
name
()
==
"composite"
)
{
cfun
=
boost
::
dynamic_pointer_cast
<
CompositeFunction
>
(
...
...
Framework/API/src/HistoryView.cpp
View file @
1473c74e
...
...
@@ -10,7 +10,7 @@ HistoryView::HistoryView(const WorkspaceHistory &wsHist)
:
m_wsHist
(
wsHist
),
m_historyItems
()
{
// add all of the top level algorithms to the view by default
const
auto
algorithms
=
wsHist
.
getAlgorithmHistories
();
AlgorithmHistories
::
const_iter
ato
r
iter
=
algorithms
.
begin
();
a
u
to
iter
=
algorithms
.
begin
();
for
(;
iter
!=
algorithms
.
end
();
++
iter
)
{
HistoryItem
item
(
*
iter
);
m_historyItems
.
push_back
(
item
);
...
...
Framework/API/src/IFunction.cpp
View file @
1473c74e
...
...
@@ -109,7 +109,7 @@ void IFunction::functionDeriv(const FunctionDomain &domain,
*/
ParameterTie
*
IFunction
::
tie
(
const
std
::
string
&
parName
,
const
std
::
string
&
expr
,
bool
isDefault
)
{
ParameterTie
*
ti
=
new
ParameterTie
(
this
,
parName
,
expr
,
isDefault
);
auto
ti
=
new
ParameterTie
(
this
,
parName
,
expr
,
isDefault
);
addTie
(
ti
);
this
->
fix
(
getParameterIndex
(
*
ti
));
return
ti
;
...
...
@@ -257,7 +257,7 @@ const std::vector<std::string> IFunction::categories() const {
Poco
::
StringTokenizer
tokenizer
(
category
(),
categorySeparator
(),
Poco
::
StringTokenizer
::
TOK_TRIM
|
Poco
::
StringTokenizer
::
TOK_IGNORE_EMPTY
);
Poco
::
StringTokenizer
::
Iter
ato
r
h
=
tokenizer
.
begin
();
a
u
to
h
=
tokenizer
.
begin
();
for
(;
h
!=
tokenizer
.
end
();
++
h
)
{
res
.
push_back
(
*
h
);
...
...
Framework/API/src/LogManager.cpp
View file @
1473c74e
...
...
@@ -395,8 +395,8 @@ void LogManager::loadNexus(::NeXus::File *file, const std::string &group,
std
::
map
<
std
::
string
,
std
::
string
>
entries
;
file
->
getEntries
(
entries
);
std
::
map
<
std
::
string
,
std
::
string
>::
iter
ato
r
it
=
entries
.
begin
();
std
::
map
<
std
::
string
,
std
::
string
>::
iter
ato
r
it_end
=
entries
.
end
();
a
u
to
it
=
entries
.
begin
();
a
u
to
it_end
=
entries
.
end
();
for
(;
it
!=
it_end
;
++
it
)
{
// Get the name/class pair
const
std
::
pair
<
std
::
string
,
std
::
string
>
&
name_class
=
*
it
;
...
...
Framework/API/src/MDGeometry.cpp
View file @
1473c74e
...
...
@@ -146,7 +146,7 @@ Mantid::Geometry::VecIMDDimension_const_sptr
MDGeometry
::
getNonIntegratedDimensions
()
const
{
using
namespace
Mantid
::
Geometry
;
VecIMDDimension_const_sptr
vecCollapsedDimensions
;
std
::
vector
<
Mantid
::
Geometry
::
IMDDimension_sptr
>::
const_iterator
it
=
auto
it
=
this
->
m_dimensions
.
begin
();
for
(;
it
!=
this
->
m_dimensions
.
end
();
++
it
)
{
IMDDimension_sptr
current
=
(
*
it
);
...
...
Framework/API/src/MatrixWorkspace.cpp
View file @
1473c74e
...
...
@@ -519,7 +519,7 @@ void MatrixWorkspace::getDetectorIDToWorkspaceIndexVector(
// Allow multiple detectors per workspace index, or,
// If only one is allowed, then this has thrown already
for
(
std
::
set
<
detid_t
>::
const_iter
ato
r
it
=
detList
.
begin
();
for
(
a
u
to
it
=
detList
.
begin
();
it
!=
detList
.
end
();
++
it
)
{
int
index
=
*
it
+
offset
;
if
(
index
<
0
||
index
>=
outSize
)
{
...
...
@@ -550,7 +550,7 @@ void MatrixWorkspace::getIndicesFromSpectra(
indexList
.
clear
();
indexList
.
reserve
(
this
->
getNumberHistograms
());
std
::
vector
<
specid_t
>::
const_iter
ato
r
iter
=
spectraList
.
begin
();
a
u
to
iter
=
spectraList
.
begin
();
while
(
iter
!=
spectraList
.
end
())
{
for
(
size_t
i
=
0
;
i
<
this
->
getNumberHistograms
();
++
i
)
{
if
(
this
->
getSpectrum
(
i
)
->
getSpectrumNo
()
==
*
iter
)
{
...
...
@@ -625,8 +625,8 @@ void MatrixWorkspace::getIndicesFromDetectorIDs(
void
MatrixWorkspace
::
getSpectraFromDetectorIDs
(
const
std
::
vector
<
detid_t
>
&
detIdList
,
std
::
vector
<
specid_t
>
&
spectraList
)
const
{
std
::
vector
<
detid_t
>::
const_iter
ato
r
it_start
=
detIdList
.
begin
();
std
::
vector
<
detid_t
>::
const_iter
ato
r
it_end
=
detIdList
.
end
();
a
u
to
it_start
=
detIdList
.
begin
();
a
u
to
it_end
=
detIdList
.
end
();
spectraList
.
clear
();
...
...
@@ -1016,7 +1016,7 @@ void MatrixWorkspace::maskWorkspaceIndex(const std::size_t index) {
spec
->
clearData
();
const
std
::
set
<
detid_t
>
dets
=
spec
->
getDetectorIDs
();
for
(
std
::
set
<
detid_t
>::
const_iter
ato
r
iter
=
dets
.
begin
();
for
(
a
u
to
iter
=
dets
.
begin
();
iter
!=
dets
.
end
();
++
iter
)
{
try
{
if
(
const
Geometry
::
Detector
*
det
=
...
...
@@ -1085,7 +1085,7 @@ void MatrixWorkspace::flagMasked(const size_t &spectrumIndex,
// First get a reference to the list for this spectrum (or create a new
// list)
MaskList
&
binList
=
m_masks
[
spectrumIndex
];
MaskList
::
iter
ato
r
it
=
binList
.
find
(
binIndex
);
a
u
to
it
=
binList
.
find
(
binIndex
);
if
(
it
!=
binList
.
end
())
{
binList
.
erase
(
it
);
}
...
...
@@ -1113,7 +1113,7 @@ bool MatrixWorkspace::hasMaskedBins(const size_t &workspaceIndex) const {
*/
const
MatrixWorkspace
::
MaskList
&
MatrixWorkspace
::
maskedBins
(
const
size_t
&
workspaceIndex
)
const
{
std
::
map
<
int64_t
,
MaskList
>::
const_iterator
it
=
m_masks
.
find
(
workspaceIndex
);
auto
it
=
m_masks
.
find
(
workspaceIndex
);
// Throw if there are no masked bins for this spectrum. The caller should
// check first using hasMaskedBins!
if
(
it
==
m_masks
.
end
())
{
...
...
@@ -1238,7 +1238,7 @@ size_t MatrixWorkspace::binIndexOf(const double xValue,
throw
std
::
out_of_range
(
"MatrixWorkspace::binIndexOf - X value lower than "
"lowest in current range."
);
}
MantidVec
::
const_iterator
lowit
=
auto
lowit
=
std
::
lower_bound
(
xValues
.
begin
(),
xValues
.
end
(),
xValue
);
if
(
lowit
==
xValues
.
end
())
{
throw
std
::
out_of_range
(
"MatrixWorkspace::binIndexOf - X value greater "
...
...
@@ -1438,11 +1438,11 @@ private:
boost
::
shared_ptr
<
const
Mantid
::
Geometry
::
IMDDimension
>
MatrixWorkspace
::
getDimension
(
size_t
index
)
const
{
if
(
index
==
0
)
{
MWXDimension
*
dimension
=
new
MWXDimension
(
this
,
xDimensionId
);
auto
dimension
=
new
MWXDimension
(
this
,
xDimensionId
);
return
boost
::
shared_ptr
<
const
Mantid
::
Geometry
::
IMDDimension
>
(
dimension
);
}
else
if
(
index
==
1
)
{
Axis
*
yAxis
=
this
->
getAxis
(
1
);
MWDimension
*
dimension
=
new
MWDimension
(
yAxis
,
yDimensionId
);
auto
dimension
=
new
MWDimension
(
yAxis
,
yDimensionId
);
return
boost
::
shared_ptr
<
const
Mantid
::
Geometry
::
IMDDimension
>
(
dimension
);
}
else
throw
std
::
invalid_argument
(
"MatrixWorkspace only has 2 dimensions."
);
...
...
@@ -1567,7 +1567,7 @@ signal_t MatrixWorkspace::getSignalAtCoord(
if
(
wi
<
nhist
)
{
const
MantidVec
&
X
=
this
->
readX
(
wi
);
MantidVec
::
const_iterator
it
=
std
::
lower_bound
(
X
.
begin
(),
X
.
end
(),
x
);
auto
it
=
std
::
lower_bound
(
X
.
begin
(),
X
.
end
(),
x
);
if
(
it
==
X
.
end
())
{
// Out of range
return
std
::
numeric_limits
<
double
>::
quiet_NaN
();
...
...
Framework/API/src/MultiPeriodGroupWorker.cpp
View file @
1473c74e
...
...
@@ -76,7 +76,7 @@ MultiPeriodGroupWorker::findMultiPeriodGroups(
WorkspaceNameType
workspaces
=
sourceAlg
->
getProperty
(
this
->
m_workspacePropertyName
);
WorkspaceNameType
::
iter
ato
r
it
=
workspaces
.
begin
();
a
u
to
it
=
workspaces
.
begin
();
// Inspect all the input workspaces in the ArrayProperty input.
while
(
it
!=
workspaces
.
end
())
{
...
...
@@ -93,7 +93,7 @@ MultiPeriodGroupWorker::findMultiPeriodGroups(
WorkspaceVector
outWorkspaces
;
sourceAlg
->
findWorkspaceProperties
(
inWorkspaces
,
outWorkspaces
);
UNUSED_ARG
(
outWorkspaces
);
WorkspaceVector
::
iterator
it
=
inWorkspaces
.
begin
();
auto
it
=
inWorkspaces
.
begin
();
while
(
it
!=
inWorkspaces
.
end
())
{
tryAddInputWorkspaceToInputGroups
(
*
it
,
vecWorkspaceGroups
);
++
it
;
...
...
Framework/API/src/MultipleFileProperty.cpp
View file @
1473c74e
...
...
@@ -154,7 +154,7 @@ std::vector<std::string> MultipleFileProperty::flattenFileNames(
const
std
::
vector
<
std
::
vector
<
std
::
string
>>
&
fileNames
)
{
std
::
vector
<
std
::
string
>
flattenedFileNames
;
std
::
vector
<
std
::
vector
<
std
::
string
>>::
const_iter
ato
r
it
=
fileNames
.
begin
();
a
u
to
it
=
fileNames
.
begin
();
for
(;
it
!=
fileNames
.
end
();
++
it
)
{
flattenedFileNames
.
insert
(
flattenedFileNames
.
end
(),
it
->
begin
(),
it
->
end
());
...
...
Prev
1
2
3
4
5
…
14
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment