Skip to content

Commit

Permalink
fix coverity issue 1241920 (initialize), re #11061
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed Feb 15, 2015
1 parent 11db120 commit 83389ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Expand Up @@ -76,7 +76,7 @@ namespace DataHandling {

class DLLExport LoadFITS : public API::IFileLoader<Kernel::FileDescriptor> {
public:
LoadFITS() {}
LoadFITS();
virtual ~LoadFITS() {}

/// Algorithm's name for identification overriding a virtual method
Expand Down
12 changes: 10 additions & 2 deletions Code/Mantid/Framework/DataHandling/src/LoadFITS.cpp
Expand Up @@ -40,6 +40,16 @@ namespace DataHandling {
// Register the algorithm into the AlgorithmFactory
DECLARE_FILELOADER_ALGORITHM(LoadFITS);

/**
* Constructor. Just initialize everything to prevent issues.
*/
LoadFITS::LoadFITS(): m_headerScaleKey(), m_headerOffsetKey(),
m_headerBitDepthKey(), m_headerRotationKey(),
m_headerImageKeyKey(), m_mapFile(),
m_headerAxisNameKeys(), m_baseName(),
m_spectraCount(0), m_progress(NULL) {
}

/**
* Return the confidence with with this algorithm can load the file
* @param descriptor A descriptor for the file
Expand Down Expand Up @@ -123,8 +133,6 @@ void LoadFITS::exec() {
std::vector<std::string> paths;
string fName = getPropertyValue("Filename");
boost::split(paths, fName, boost::is_any_of(","));
m_baseName = "";
m_spectraCount = 0;

// If paths contains a non fits file, assume (for now) that it contains
// information about the rotations
Expand Down

0 comments on commit 83389ae

Please sign in to comment.