Commit 6e08e89f authored by Hahn, Steven's avatar Hahn, Steven
Browse files

Apply modernize-use-nullptr on header files.

parent 9cd4ac67
......@@ -369,7 +369,7 @@ public:
// { return m_useWriteBuffer; }
/// Returns if current box controller is file backed. Assumes that
/// BC(workspace) is fileBackd if fileIO is defined;
bool isFileBacked() const { return (m_fileIO != 0); }
bool isFileBacked() const { return (m_fileIO != nullptr); }
/// returns the pointer to the class, responsible for fileIO operations;
IBoxControllerIO *getFileIO() { return m_fileIO.get(); }
/// makes box controller file based by providing class, responsible for
......
......@@ -65,9 +65,9 @@ public:
*/
virtual bool fulfillsCriterion(const Kernel::IPropertyManager *algo) const {
// Find the property
if (algo == NULL)
if (algo == nullptr)
return true;
Mantid::Kernel::Property *prop = NULL;
Mantid::Kernel::Property *prop = nullptr;
try {
prop = algo->getPointerToProperty(m_otherPropName);
} catch (Mantid::Kernel::Exception::NotFoundError &) {
......
......@@ -315,7 +315,7 @@ public:
/// Constructor
IFunction()
: m_isParallel(false), m_handler(NULL), m_progReporter(NULL),
: m_isParallel(false), m_handler(nullptr), m_progReporter(nullptr),
m_chiSquared(0.0) {}
/// Virtual destructor
virtual ~IFunction();
......
......@@ -241,9 +241,9 @@ public:
/** Split sub-boxes, if this is possible and neede for this box */
virtual void
splitAllIfNeeded(Mantid::Kernel::ThreadScheduler * /*ts*/ = NULL) = 0;
splitAllIfNeeded(Mantid::Kernel::ThreadScheduler * /*ts*/ = nullptr) = 0;
/** Recalculate signal etc. */
virtual void refreshCache(Kernel::ThreadScheduler * /*ts*/ = NULL) = 0;
virtual void refreshCache(Kernel::ThreadScheduler * /*ts*/ = nullptr) = 0;
/** Calculate the centroid of this box and all sub-boxes. */
virtual void calculateCentroid(coord_t * /*centroid*/) const = 0;
/** Calculate the centroid of this box and all sub-boxes. */
......
......@@ -96,7 +96,7 @@ public:
/// Creates a new iterator pointing to the first cell in the workspace
virtual std::vector<IMDIterator *> createIterators(
size_t suggestedNumCores = 1,
Mantid::Geometry::MDImplicitFunction *function = NULL) const = 0;
Mantid::Geometry::MDImplicitFunction *function = nullptr) const = 0;
/// Returns the (normalized) signal at a given coordinates
virtual signal_t
......@@ -116,8 +116,8 @@ public:
std::vector<coord_t> &x, std::vector<signal_t> &y,
std::vector<signal_t> &e) const;
IMDIterator *
createIterator(Mantid::Geometry::MDImplicitFunction *function = NULL) const;
IMDIterator *createIterator(
Mantid::Geometry::MDImplicitFunction *function = nullptr) const;
std::string getConvention() const;
void setConvention(std::string m_convention);
......
......@@ -83,7 +83,7 @@ protected:
}
void checkSuccessorExists() {
if (0 == m_successor.get()) {
if (nullptr == m_successor.get()) {
std::string message = "There is no successor function parser. Is this an "
"empty composite function?";
throw std::runtime_error(message);
......
......@@ -52,7 +52,7 @@ class MANTID_API_DLL LiveListenerFactoryImpl
public:
boost::shared_ptr<ILiveListener>
create(const std::string &instrumentName, bool connect,
const Kernel::IPropertyManager *props = NULL) const;
const Kernel::IPropertyManager *props = nullptr) const;
bool checkConnection(const std::string &instrumentName) const;
private:
......
......@@ -422,9 +422,9 @@ public:
const Mantid::API::MDNormalization &normalization) const;
/// Create iterators. Partitions the iterators according to the number of
/// cores.
virtual std::vector<IMDIterator *>
createIterators(size_t suggestedNumCores = 1,
Mantid::Geometry::MDImplicitFunction *function = NULL) const;
virtual std::vector<IMDIterator *> createIterators(
size_t suggestedNumCores = 1,
Mantid::Geometry::MDImplicitFunction *function = nullptr) const;
/// Apply masking.
void setMDMasking(Mantid::Geometry::MDImplicitFunction *maskingRegion);
......@@ -471,7 +471,8 @@ protected:
/// Protected copy assignment operator. Assignment not implemented.
MatrixWorkspace &operator=(const MatrixWorkspace &other);
MatrixWorkspace(Mantid::Geometry::INearestNeighboursFactory *factory = NULL);
MatrixWorkspace(
Mantid::Geometry::INearestNeighboursFactory *factory = nullptr);
/// Initialises the workspace. Sets the size and lengths of the arrays. Must
/// be overloaded.
......
......@@ -57,7 +57,7 @@ public:
/// Evaluate the expression
virtual double eval();
/// Return the string that can be used to recreate this tie
virtual std::string asString(const IFunction *fun = NULL) const;
virtual std::string asString(const IFunction *fun = nullptr) const;
/// Check if the tie has any references to certain parameters
bool findParametersOf(const IFunction *fun) const;
......
......@@ -143,7 +143,7 @@ VectorParameter<Derived, ElemType>::VectorParameter(
/// Default constructor
template <typename Derived, typename ElemType>
VectorParameter<Derived, ElemType>::VectorParameter()
: m_arry(NULL), m_size(0) {
: m_arry(nullptr), m_size(0) {
m_isValid = false;
}
......
......@@ -419,7 +419,7 @@ private:
} else {
// ... and if it is a workspace of incorrect type, exclude the group by
// returning an error.
if (NULL == boost::dynamic_pointer_cast<TYPE>(memberWs)) {
if (nullptr == boost::dynamic_pointer_cast<TYPE>(memberWs)) {
error = "Workspace " + memberWsName + " is not of type " +
Kernel::PropertyWithValue<boost::shared_ptr<TYPE>>::type() +
".";
......
......@@ -54,12 +54,12 @@ public:
/// (Empty) Constructor
CalculateFlatBackground()
: API::Algorithm(), m_convertedFromRawCounts(false),
m_skipMonitors(false), m_nullifyNegative(true), m_progress(NULL) {}
m_skipMonitors(false), m_nullifyNegative(true), m_progress(nullptr) {}
/// Virtual destructor
virtual ~CalculateFlatBackground() {
if (m_progress)
delete m_progress;
m_progress = NULL;
m_progress = nullptr;
}
/// Algorithm's name
virtual const std::string name() const { return "CalculateFlatBackground"; }
......
......@@ -59,12 +59,12 @@ namespace Algorithms {
class DLLExport CrossCorrelate : public API::Algorithm {
public:
/// (Empty) Constructor
CrossCorrelate() : API::Algorithm(), m_progress(NULL) {}
CrossCorrelate() : API::Algorithm(), m_progress(nullptr) {}
/// Virtual destructor
virtual ~CrossCorrelate() {
if (m_progress)
delete m_progress;
m_progress = NULL;
m_progress = nullptr;
}
/// Algorithm's name
virtual const std::string name() const { return "CrossCorrelate"; }
......
......@@ -66,7 +66,7 @@ public:
virtual ~FindPeaks() {
if (m_progress)
delete m_progress;
m_progress = NULL;
m_progress = nullptr;
}
/// Algorithm's name
virtual const std::string name() const { return "FindPeaks"; }
......
......@@ -44,7 +44,7 @@ public:
void initialize(const API::MatrixWorkspace_const_sptr &bkgWS,
const API::MatrixWorkspace_sptr &sourceWS, int emode,
Kernel::Logger *pLog = NULL, int nTreads = 1,
Kernel::Logger *pLog = nullptr, int nTreads = 1,
bool inPlace = true, bool nullifyNegative = false);
void removeBackground(int hist, MantidVec &XValues, MantidVec &y_data,
MantidVec &e_data, int tread_num = 0) const;
......
......@@ -136,7 +136,7 @@ public:
// methods
bool read(void *buffer, uint32_t size);
bool seek(int64_t offset, int whence, int64_t *newPosition = NULL);
bool seek(int64_t offset, int whence, int64_t *newPosition = nullptr);
};
namespace Tar {
......
......@@ -70,7 +70,7 @@ public:
FILE *openRawFile(const std::string &fileName);
/// Read in run parameters Public so that LoadRaw2 can use it
void loadRunParameters(API::MatrixWorkspace_sptr localWorkspace,
ISISRAW *const = NULL) const;
ISISRAW *const = nullptr) const;
/// Returns a confidence value that this algorithm can load a file
virtual int confidence(Kernel::FileDescriptor &descriptor) const;
......
......@@ -247,7 +247,7 @@ struct LOG_LINE {
int len; ///< real length of data
char *data; ///< padded to multiple of 4 bytes
/// constructor
LOG_LINE() : len(0), data(0) {}
LOG_LINE() : len(0), data(nullptr) {}
};
/// log line entry
......@@ -256,7 +256,7 @@ struct LOG_STRUCT {
int nlines; ///< number of lines
LOG_LINE *lines; ///< size nlines
/// constructor
LOG_STRUCT() : ver(2), nlines(0), lines(0) {}
LOG_STRUCT() : ver(2), nlines(0), lines(nullptr) {}
};
/// isis raw file.
......
......@@ -20,7 +20,7 @@ public:
: value(v), det_average(da), dim0(d0), dim1(d1) {}
};
item_struct() : m_items(), m_spec_array(NULL), m_ndet(0){};
item_struct() : m_items(), m_spec_array(nullptr), m_ndet(0){};
private:
typedef std::map<std::string, item_t>
......@@ -39,7 +39,7 @@ public:
@return 0 on success, -1 if it is a duplicate
*/
int addItem(const std::string &name, const T *value, bool det_average = false,
const int *dim0 = NULL, const int *dim1 = NULL) {
const int *dim0 = nullptr, const int *dim1 = nullptr) {
std::pair<typename items_map_t::iterator, bool> insert_ret;
insert_ret = m_items.insert(typename items_map_t::value_type(
name, item_t(value, det_average, dim0, dim1)));
......
......@@ -43,7 +43,7 @@ public:
BoxControllerNeXusIO(API::BoxController *const theBC);
///@return true if the file to write events is opened and false otherwise
virtual bool isOpened() const { return (m_File != NULL); }
virtual bool isOpened() const { return (m_File != nullptr); }
/// get the full file name of the file used for IO operations
virtual const std::string &getFileName() const { return m_fileName; }
/**Return the size of the NeXus data block used in NeXus data array*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment