Skip to content

Commit

Permalink
refs #18950 clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyLim23 committed Feb 23, 2017
1 parent abd3fe0 commit 786d435
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
Expand Up @@ -95,7 +95,7 @@ class MANTIDQT_CUSTOMINTERFACES_DLL MuonAnalysisDataLoader {
/// Load dead times from file
Mantid::API::Workspace_sptr
loadDeadTimesFromFile(const std::string &filename) const;
//empty the cache
// empty the cache
void clearCache();

protected:
Expand Down
2 changes: 1 addition & 1 deletion MantidQt/CustomInterfaces/src/Muon/MuonAnalysis.cpp
Expand Up @@ -2757,7 +2757,7 @@ void MuonAnalysis::deadTimeFileSelected() {
* from the form
*/
void MuonAnalysis::setTimeZeroState(int checkBoxState) {
m_dataLoader.clearCache();
m_dataLoader.clearCache();
if (checkBoxState == -1)
checkBoxState = m_uiForm.timeZeroAuto->checkState();

Expand Down
15 changes: 7 additions & 8 deletions MantidQt/CustomInterfaces/src/Muon/MuonAnalysisDataLoader.cpp
Expand Up @@ -73,7 +73,7 @@ LoadResult MuonAnalysisDataLoader::loadFiles(const QStringList &files) const {
throw std::invalid_argument("Supplied list of files is empty");

// Convert list of files into a mangled map key
const auto toString = [](QStringList qsl) {
const auto toString = [](QStringList qsl) {
std::ostringstream oss;
qsl.sort();
for (const QString qs : qsl) {
Expand All @@ -86,10 +86,9 @@ LoadResult MuonAnalysisDataLoader::loadFiles(const QStringList &files) const {
updateCache();
// Check cache to see if we've loaded this set of files before
const std::string fileString = toString(files);
if (m_loadedDataCache.find(fileString) != m_loadedDataCache.end())
{
g_log.information("Using cached workspace for file(s): " + fileString);
return m_loadedDataCache[fileString];
if (m_loadedDataCache.find(fileString) != m_loadedDataCache.end()) {
g_log.information("Using cached workspace for file(s): " + fileString);
return m_loadedDataCache[fileString];
}

LoadResult result;
Expand Down Expand Up @@ -474,9 +473,9 @@ void MuonAnalysisDataLoader::updateCache() const {
}

void MuonAnalysisDataLoader::clearCache() {
if (!m_loadedDataCache.empty()) {
m_loadedDataCache.clear();
}
if (!m_loadedDataCache.empty()) {
m_loadedDataCache.clear();
}
}

} // namespace CustomInterfaces
Expand Down

0 comments on commit 786d435

Please sign in to comment.