Skip to content

Commit b157e07

Browse files
Deprecate LoadDspacemap - Sibling (#38020)
* Deprecate and add note * Rename release note * Remove CppCheck suppression * Correct date Co-authored-by: Pete Peterson <petersonpf@ornl.gov> --------- Co-authored-by: Pete Peterson <petersonpf@ornl.gov>
1 parent 1a96441 commit b157e07

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

Framework/DataHandling/inc/MantidDataHandling/LoadDspacemap.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#pragma once
88

99
#include "MantidAPI/Algorithm.h"
10+
#include "MantidAPI/DeprecatedAlgorithm.h"
1011
#include "MantidAPI/MatrixWorkspace_fwd.h"
1112
#include "MantidDataHandling/DllConfig.h"
1213
#include "MantidDataObjects/OffsetsWorkspace.h"
@@ -22,8 +23,10 @@ namespace DataHandling {
2223
* @author Janik Zikovsky (code from Vickie Lynch)
2324
* @date 2011-05-10
2425
*/
25-
class MANTID_DATAHANDLING_DLL LoadDspacemap final : public API::Algorithm {
26+
class MANTID_DATAHANDLING_DLL LoadDspacemap final : public API::Algorithm, public API::DeprecatedAlgorithm {
2627
public:
28+
LoadDspacemap();
29+
2730
/// Algorithm's name for identification
2831
const std::string name() const override { return "LoadDspacemap"; };
2932
/// Summary of algorithms purpose

Framework/DataHandling/src/LoadDspacemap.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ namespace Mantid::DataHandling {
2828
// Register the algorithm into the AlgorithmFactory
2929
DECLARE_ALGORITHM(LoadDspacemap)
3030

31+
LoadDspacemap::LoadDspacemap() { this->deprecatedDate("2024-09-17"); }
32+
3133
//----------------------------------------------------------------------------------------------
3234
/** Initialize the algorithm's properties.
3335
*/
@@ -339,7 +341,7 @@ struct VulcanCorrectionFactor {
339341
void LoadDspacemap::readVulcanBinaryFile(const std::string &fileName, std::map<detid_t, double> &vulcan) {
340342
BinaryFile<VulcanCorrectionFactor> file(fileName);
341343
std::vector<VulcanCorrectionFactor> results = file.loadAll();
342-
for (auto &result : results) {
344+
for (const auto &result : results) {
343345
vulcan[static_cast<detid_t>(result.pixelID)] = result.factor;
344346
}
345347
}

buildconfig/CMake/CppCheck_Suppressions.txt.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,6 @@ duplicateConditionalAssign:${CMAKE_SOURCE_DIR}/Framework/DataHandling/src/LoadCa
643643
constParameterPointer:${CMAKE_SOURCE_DIR}/Framework/DataHandling/src/LoadCalFile.cpp:57
644644
uselessOverride:${CMAKE_SOURCE_DIR}/Framework/DataHandling/inc/MantidDataHandling/LoadDNSEvent.h:44
645645
passedByValue:${CMAKE_SOURCE_DIR}/Framework/DataHandling/inc/MantidDataHandling/BitStream.h:30
646-
constVariableReference:${CMAKE_SOURCE_DIR}/Framework/DataHandling/src/LoadDspacemap.cpp:342
647646
cstyleCast:${CMAKE_SOURCE_DIR}/Framework/DataHandling/src/LoadANSTOHelper.cpp:210
648647
variableScope:${CMAKE_SOURCE_DIR}/Framework/DataHandling/src/DetermineChunking.cpp:163
649648
unreadVariable:${CMAKE_SOURCE_DIR}/Framework/DataHandling/src/LoadANSTOHelper.cpp:436
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- :ref:`LoadDspacemap <algm-LoadDspacemap>` has been deprecated.

0 commit comments

Comments
 (0)