Commit a144a230 authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Apply clang-format

parent 02ab69f9
......@@ -123,7 +123,8 @@ public:
FunctionFactory::Instance().createFunction("ProductQuadraticExp");
TS_ASSERT(func != nullptr);
TS_ASSERT_EQUALS(func->name(), "ProductQuadraticExp");
TS_ASSERT(boost::dynamic_pointer_cast<ProductQuadraticExp>(func) != nullptr);
TS_ASSERT(boost::dynamic_pointer_cast<ProductQuadraticExp>(func) !=
nullptr);
}
void test_set_parameters() {
......
......@@ -26,7 +26,8 @@ public:
"Too many output dimensions",
CoordTransformAligned ct(3, 4, nullptr, nullptr, nullptr););
TSM_ASSERT_THROWS_ANYTHING(
"Null input", CoordTransformAligned ct(1, 1, nullptr, nullptr, nullptr););
"Null input",
CoordTransformAligned ct(1, 1, nullptr, nullptr, nullptr););
size_t dimToBinFrom[3] = {4, 1, 0};
coord_t origin[3] = {5, 10, 15};
coord_t scaling[3] = {1, 2, 3};
......
......@@ -108,8 +108,8 @@ public:
* @param bin :: MDBin object giving the limits of events to accept.
*/
void centerpointBin(MDBin<MDE, nd> & /*bin*/, bool *) const override {}
void
splitAllIfNeeded(Mantid::Kernel::ThreadScheduler * /*ts*/ = nullptr) override{};
void splitAllIfNeeded(
Mantid::Kernel::ThreadScheduler * /*ts*/ = nullptr) override{};
void refreshCache(Kernel::ThreadScheduler * /*ts*/ = nullptr) override{};
// virtual void refreshCentroid(Kernel::ThreadScheduler * /*ts*/ = NULL){};
void calculateCentroid(coord_t * /*centroid*/) const override{};
......
......@@ -247,7 +247,8 @@ public:
// Check the type of the output product object.
TSM_ASSERT("Factory product is the wrong type.",
boost::dynamic_pointer_cast<PeakTransformHKL>(product) != nullptr);
boost::dynamic_pointer_cast<PeakTransformHKL>(product) !=
nullptr);
// Now test that the benchmark and the factory product are equivalent.
// Test indirectly via what the transformations produce.
......
......@@ -168,7 +168,8 @@ public:
PeakTransform_sptr clone = A.clone();
TSM_ASSERT("Clone product is the wrong type.",
boost::dynamic_pointer_cast<PeakTransformQLab>(clone) != nullptr);
boost::dynamic_pointer_cast<PeakTransformQLab>(clone) !=
nullptr);
// Test indirectly via what the transformations produce.
V3D productA = A.transform(V3D(0, 1, 2));
......@@ -192,7 +193,8 @@ public:
// Check the type of the output product object.
TSM_ASSERT("Factory product is the wrong type.",
boost::dynamic_pointer_cast<PeakTransformQLab>(product) != nullptr);
boost::dynamic_pointer_cast<PeakTransformQLab>(product) !=
nullptr);
// Now test that the benchmark and the factory product are equivalent.
// Test indirectly via what the transformations produce.
......
......@@ -93,7 +93,8 @@ std::string toPrettyString(
bool collapseLists = true, const std::string &delimiter = ",",
const std::string &unusedDelimiter = "+",
typename std::enable_if<!(std::is_integral<T>::value &&
std::is_arithmetic<T>::value)>::type * = nullptr) {
std::is_arithmetic<T>::value)>::type * =
nullptr) {
UNUSED_ARG(unusedDelimiter);
UNUSED_ARG(collapseLists);
return Strings::shorten(Strings::join(value.begin(), value.end(), delimiter),
......
......@@ -59,7 +59,8 @@ private:
class MockImplicitFunctionParser
: public Mantid::API::ImplicitFunctionParser {
public:
MockImplicitFunctionParser() : Mantid::API::ImplicitFunctionParser(nullptr) {}
MockImplicitFunctionParser()
: Mantid::API::ImplicitFunctionParser(nullptr) {}
Mantid::API::ImplicitFunctionBuilder *
createFunctionBuilder(Poco::XML::Element * /*functionElement*/) override {
return new MockImplicitFunctionBuilder;
......
......@@ -23,7 +23,7 @@ public:
using namespace Mantid::MDAlgorithms;
TobyFitYVector *yVector(nullptr); // TS_ macro doesn't work with stack
// construction & no default constructor
// construction & no default constructor
TS_ASSERT_THROWS_NOTHING(yVector = new TobyFitYVector);
delete yVector;
......
......@@ -1745,13 +1745,17 @@ void ApplicationWindow::plot3DRibbon() {
tr("You must select exactly one column for plotting!"));
}
 
void ApplicationWindow::plot3DWireframe() { plot3DMatrix(nullptr, Qwt3D::WIREFRAME); }
void ApplicationWindow::plot3DWireframe() {
plot3DMatrix(nullptr, Qwt3D::WIREFRAME);
}
 
void ApplicationWindow::plot3DHiddenLine() {
plot3DMatrix(nullptr, Qwt3D::HIDDENLINE);
}
 
void ApplicationWindow::plot3DPolygons() { plot3DMatrix(nullptr, Qwt3D::FILLED); }
void ApplicationWindow::plot3DPolygons() {
plot3DMatrix(nullptr, Qwt3D::FILLED);
}
 
void ApplicationWindow::plot3DWireSurface() {
plot3DMatrix(nullptr, Qwt3D::FILLEDMESH);
......
......@@ -1028,7 +1028,8 @@ public slots:
void appendProject();
//! Open the specified project file and add it as a subfolder to the
// parentFolder or to the current folder if no parent folder is specified.
Folder *appendProject(const QString &file_name, Folder *parentFolder = nullptr);
Folder *appendProject(const QString &file_name,
Folder *parentFolder = nullptr);
void saveAsProject();
//! adds a folder list item to the list view "lv"
......
......@@ -55,8 +55,9 @@ class AxisDetails : public QWidget {
Q_OBJECT
// details for each axis in the Axis tab
public:
AxisDetails(ApplicationWindow *app, Graph *graph, int mappedaxis,
QWidget *parent = nullptr); // populate and fill in with existing data
AxisDetails(
ApplicationWindow *app, Graph *graph, int mappedaxis,
QWidget *parent = nullptr); // populate and fill in with existing data
~AxisDetails() override;
void initWidgets();
bool modified() { return m_modified; }
......
......@@ -34,8 +34,8 @@
#include <QLayout>
ColorMapDialog::ColorMapDialog(QWidget *parent, Qt::WFlags fl)
: QDialog(parent, fl), applyBtn(nullptr), closeBtn(nullptr), editor(nullptr),
d_matrix(nullptr) {
: QDialog(parent, fl), applyBtn(nullptr), closeBtn(nullptr),
editor(nullptr), d_matrix(nullptr) {
setObjectName("ColorMapDialog");
setWindowTitle(tr("MantidPlot") + " - " + tr("Custom Color Map"));
editor = new ColorMapEditor();
......
......@@ -49,9 +49,10 @@ ContourLinesEditor::ContourLinesEditor(const QLocale &locale, int precision,
QWidget *parent)
: QWidget(parent), table(nullptr), insertBtn(nullptr), deleteBtn(nullptr),
d_spectrogram(nullptr), d_locale(locale), d_precision(precision),
penDialog(nullptr), penColorBox(nullptr), penStyleBox(nullptr), penWidthBox(nullptr),
applyAllColorBox(nullptr), applyAllWidthBox(nullptr), applyAllStyleBox(nullptr),
d_pen_index(0), d_pen_list() {
penDialog(nullptr), penColorBox(nullptr), penStyleBox(nullptr),
penWidthBox(nullptr), applyAllColorBox(nullptr),
applyAllWidthBox(nullptr), applyAllStyleBox(nullptr), d_pen_index(0),
d_pen_list() {
table = new QTableWidget();
table->setColumnCount(2);
table->hideColumn(1);
......
......@@ -45,9 +45,10 @@
ExpDecayDialog::ExpDecayDialog(int type, QWidget *parent, Qt::WFlags fl)
: QDialog(parent, fl), fitter(nullptr), graph(nullptr), buttonFit(nullptr),
buttonCancel(nullptr), boxName(nullptr), boxAmplitude(nullptr), boxFirst(nullptr),
boxSecond(nullptr), boxThird(nullptr), boxStart(nullptr), boxYOffset(nullptr),
thirdLabel(nullptr), dampingLabel(nullptr), boxColor(nullptr) {
buttonCancel(nullptr), boxName(nullptr), boxAmplitude(nullptr),
boxFirst(nullptr), boxSecond(nullptr), boxThird(nullptr),
boxStart(nullptr), boxYOffset(nullptr), thirdLabel(nullptr),
dampingLabel(nullptr), boxColor(nullptr) {
setObjectName("ExpDecayDialog");
slopes = type;
......
......@@ -50,9 +50,10 @@
#include <QApplication>
FFTDialog::FFTDialog(int type, QWidget *parent, Qt::WFlags fl)
: QDialog(parent, fl), buttonOK(nullptr), buttonCancel(nullptr), forwardBtn(nullptr),
backwardBtn(nullptr), boxName(nullptr), boxReal(nullptr), boxImaginary(nullptr),
boxSampling(nullptr), boxNormalize(nullptr), boxOrder(nullptr) {
: QDialog(parent, fl), buttonOK(nullptr), buttonCancel(nullptr),
forwardBtn(nullptr), backwardBtn(nullptr), boxName(nullptr),
boxReal(nullptr), boxImaginary(nullptr), boxSampling(nullptr),
boxNormalize(nullptr), boxOrder(nullptr) {
setWindowTitle(tr("MantidPlot - FFT Options"));
d_matrix = nullptr;
......
......@@ -43,9 +43,9 @@
#include <QComboBox>
FilterDialog::FilterDialog(int type, QWidget *parent, Qt::WFlags fl)
: QDialog(parent, fl), graph(nullptr), buttonFilter(nullptr), buttonCancel(nullptr),
boxName(nullptr), boxOffset(nullptr), boxStart(nullptr), boxEnd(nullptr),
boxColor(nullptr) {
: QDialog(parent, fl), graph(nullptr), buttonFilter(nullptr),
buttonCancel(nullptr), boxName(nullptr), boxOffset(nullptr),
boxStart(nullptr), boxEnd(nullptr), boxColor(nullptr) {
setWindowTitle(tr("MantidPlot - Filter options"));
filter_type = type;
......
......@@ -59,7 +59,8 @@ public:
enum WeightingMethod { NoWeighting, Instrumental, Statistical, Dataset };
enum FitType { BuiltIn = 0, Plugin = 1, User = 2 };
Fit(ApplicationWindow *parent, Graph *g = nullptr, const QString &name = QString());
Fit(ApplicationWindow *parent, Graph *g = nullptr,
const QString &name = QString());
Fit(ApplicationWindow *parent, Table *t, const QString &name = QString());
~Fit() override;
......
......@@ -39,7 +39,8 @@ using namespace MantidQt::API;
Folder::Folder(Folder *parent, const QString &name)
: QObject(parent),
birthdate(QDateTime::currentDateTime().toString(Qt::LocalDate)),
d_log_info(QString()), myFolderListItem(nullptr), d_active_window(nullptr) {
d_log_info(QString()), myFolderListItem(nullptr),
d_active_window(nullptr) {
setObjectName(name);
}
......
......@@ -47,7 +47,8 @@ class FunctionDialog : public QDialog {
Q_OBJECT
public:
FunctionDialog(ApplicationWindow *app, Graph *g = nullptr, Qt::WFlags fl = nullptr);
FunctionDialog(ApplicationWindow *app, Graph *g = nullptr,
Qt::WFlags fl = nullptr);
protected:
QComboBox *boxXFunction;
......
......@@ -45,8 +45,9 @@ class Grid;
class GridDetails : public QWidget {
Q_OBJECT
public:
GridDetails(ApplicationWindow *app, Graph *graph, int alignment,
QWidget *parent = nullptr); // populate and fill in with existing data
GridDetails(
ApplicationWindow *app, Graph *graph, int alignment,
QWidget *parent = nullptr); // populate and fill in with existing data
~GridDetails() override;
void initWidgets();
bool modified() { return m_modified; }
......
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