Skip to content
Snippets Groups Projects
Commit a5764e10 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

clang-format

parent 5069d78a
No related branches found
No related tags found
1 merge request!495Autoformatting
Showing
with 35 additions and 39 deletions
......@@ -20,9 +20,9 @@
#ifndef BORNAGAIN_BASE_MATH_INTEGRATORGK_H
#define BORNAGAIN_BASE_MATH_INTEGRATORGK_H
#include <heinz/Complex.h>
#include <functional>
#include <gsl/gsl_integration.h>
#include <heinz/Complex.h>
//! To integrate a real function of a real variable.
class RealIntegrator {
......
......@@ -14,9 +14,9 @@
#include "Device/Beam/Beam.h"
#include "Base/Math/Constants.h"
#include <heinz/Complex.h>
#include "Base/Util/Assert.h"
#include "Device/Beam/FootprintGauss.h"
#include <heinz/Complex.h>
namespace {
......
......@@ -49,9 +49,7 @@ OutputData<double>* IntensityDataIOFactory::readOutputData(const std::string& fi
file_name, [](std::istream& s) { return OutputDataReadWriteINT().readOutputData(s); });
if (readAs(nicos))
return readOutputData(file_name, [](std::istream& s) {
return IO::readNicosData(s);
});
return readOutputData(file_name, [](std::istream& s) { return IO::readNicosData(s); });
#ifdef BORNAGAIN_TIFF_SUPPORT
if (readAs(tiff))
......
......@@ -21,7 +21,7 @@
namespace IO {
OutputData<double>* readNicosData(std::istream& input_stream);
OutputData<double>* readNicosData(std::istream& input_stream);
};
......
......@@ -12,8 +12,8 @@
//
// ************************************************************************************************
#include "Device/InputOutput/OutputDataReadWriteNicos.h"
#include "Base/Util/StringUtils.h"
#include "Device/InputOutput/OutputDataReadWriteNicos.h"
namespace {
......@@ -35,8 +35,8 @@ unsigned int readAssignedPositiveIntValue(const std::string& line, int lineNumbe
lineRelatedError("Can't parse assigned value '" + parts[1] + "'", lineNumber));
if (value <= 0)
throw std::runtime_error(lineRelatedError("Value of '" + parts[1] + "' is nonpositive",
lineNumber));
throw std::runtime_error(
lineRelatedError("Value of '" + parts[1] + "' is nonpositive", lineNumber));
return value;
}
......@@ -75,7 +75,7 @@ OutputData<double>* IO::readNicosData(std::istream& input_stream)
if (BaseUtils::String::startsWith(line, "Type=")) {
const auto parts = BaseUtils::String::split(line, "=");
if (parts[1]!="SANSDRaw")
if (parts[1] != "SANSDRaw")
throw std::runtime_error(
lineRelatedError("Unsupported file type '" + parts[1] + "'", lineNumber));
typeFound = true;
......@@ -131,8 +131,8 @@ OutputData<double>* IO::readNicosData(std::istream& input_stream)
if (valuesAsString.size() != width)
throw std::runtime_error(
lineRelatedError("Number of found values (" + std::to_string(valuesAsString.size())
+ ") does not match DataSizeX (" + std::to_string(width) + ")",
lineNumber));
+ ") does not match DataSizeX (" + std::to_string(width) + ")",
lineNumber));
for (unsigned col = 0; col < width; ++col) {
const size_t global_index = result->toGlobalIndex(
......@@ -141,10 +141,9 @@ OutputData<double>* IO::readNicosData(std::istream& input_stream)
int value = 0;
if (!BaseUtils::String::to_int(valuesAsString[col], &value))
throw std::runtime_error(
lineRelatedError("Value '" + valuesAsString[col] +
"' could not be converted to integer",
lineNumber));
throw std::runtime_error(lineRelatedError(
"Value '" + valuesAsString[col] + "' could not be converted to integer",
lineNumber));
(*result)[global_index] = value;
}
......
......@@ -16,8 +16,8 @@
#ifndef BORNAGAIN_DEVICE_INSTRUMENT_INSTRUMENT_H
#define BORNAGAIN_DEVICE_INSTRUMENT_INSTRUMENT_H
#include <heinz/Vectors3D.h>
#include "Param/Node/INode.h"
#include <heinz/Vectors3D.h>
#include <memory>
class Beam;
......
......@@ -13,8 +13,8 @@
// ************************************************************************************************
#include "Device/Pol/PolFilter.h"
#include <heinz/Complex.h>
#include "Fit/Param/RealLimits.h"
#include <heinz/Complex.h>
PolFilter::PolFilter(R3 direction, double efficiency, double total_transmission)
: m_direction(direction), m_efficiency(efficiency), m_total_transmission(total_transmission)
......
......@@ -21,8 +21,8 @@
#define BORNAGAIN_DEVICE_POL_POLFILTER_H
#include "Base/Vector/EigenCore.h"
#include <heinz/Vectors3D.h>
#include "Param/Node/INode.h"
#include <heinz/Vectors3D.h>
//! Detector properties (efficiency, transmission).
//! @ingroup detector
......
......@@ -13,9 +13,9 @@
// ************************************************************************************************
#include "GUI/Model/Fit/FitParameterProxyModel.h"
#include "GUI/Model/Fit/FitParameterContainerItem.h"
#include "GUI/Model/Fit/FitParameterHelper.h"
#include "GUI/Model/Fit/FitParameterItem.h"
#include "GUI/Model/Fit/FitParameterContainerItem.h"
#include "GUI/Model/Fit/FitParameterLinkItem.h"
#include "GUI/Model/Job/JobModel.h"
#include "GUI/Model/Session/ModelPath.h"
......
......@@ -57,8 +57,7 @@ const QMap<QString, std::tuple<QString, QString, std::function<MultiLayer*()>>>
"Hexagonal lattice with basis to represent two layers of spheres",
ExemplarySamples::createParticleComposition}},
{"MesoCrystalBuilder", {"Mesocrystal", "", ExemplarySamples::createMesoCrystal}}
};
{"MesoCrystalBuilder", {"Mesocrystal", "", ExemplarySamples::createMesoCrystal}}};
} // namespace
......@@ -70,7 +69,7 @@ bool GUI::ExamplesFactory::isValidExampleName(const QString& name)
//! Populate sample model with
SessionItem* GUI::ExamplesFactory::createSampleItems(const QString& name, SampleModel* sampleModel,
MaterialModel* materialModel)
MaterialModel* materialModel)
{
ASSERT(isValidExampleName(name));
MultiLayer* sample = std::get<2>(builders[name])();
......
......@@ -24,16 +24,16 @@ class MaterialModel;
//! Class that generates GUI model from
namespace GUI::ExamplesFactory {
bool isValidExampleName(const QString& name);
bool isValidExampleName(const QString& name);
SessionItem* createSampleItems(const QString& name, SampleModel* sampleModel,
MaterialModel* materialModel);
SessionItem* createSampleItems(const QString& name, SampleModel* sampleModel,
MaterialModel* materialModel);
//! The internal example name, e.g. for creation with createSampleItems.
QStringList exampleNames();
//! The internal example name, e.g. for creation with createSampleItems.
QStringList exampleNames();
//! Returns human readable name and description
std::tuple<QString, QString> exampleInfo(const QString& name);
//! Returns human readable name and description
std::tuple<QString, QString> exampleInfo(const QString& name);
} // namespace GUI::ExamplesFactory
......
......@@ -15,9 +15,9 @@
#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_BEAMITEMS_H
#define BORNAGAIN_GUI_MODEL_INSTRUMENT_BEAMITEMS_H
#include <heinz/Vectors3D.h>
#include "GUI/Model/Instrument/SpecularBeamInclinationItem.h"
#include "GUI/Model/Session/SessionItem.h"
#include <heinz/Vectors3D.h>
class BasicAxisItem;
class Beam;
......
......@@ -15,8 +15,8 @@
#ifndef BORNAGAIN_GUI_MODEL_INSTRUMENT_DETECTORITEMS_H
#define BORNAGAIN_GUI_MODEL_INSTRUMENT_DETECTORITEMS_H
#include <heinz/Vectors3D.h>
#include "GUI/Model/Session/SessionItem.h"
#include <heinz/Vectors3D.h>
class MaskContainerItem;
class IDetector2D;
......
......@@ -15,9 +15,9 @@
#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_ITEMWITHPARTICLES_H
#define BORNAGAIN_GUI_MODEL_SAMPLE_ITEMWITHPARTICLES_H
#include <heinz/Vectors3D.h>
#include "GUI/Model/Group/SelectionDescriptor.h"
#include "GUI/Model/Session/SessionItem.h"
#include <heinz/Vectors3D.h>
class DoubleDescriptor;
class IParticle;
......
......@@ -15,8 +15,8 @@
#ifndef BORNAGAIN_GUI_MODEL_SAMPLE_MULTILAYERITEM_H
#define BORNAGAIN_GUI_MODEL_SAMPLE_MULTILAYERITEM_H
#include <heinz/Vectors3D.h>
#include "GUI/Model/Session/SessionItem.h"
#include <heinz/Vectors3D.h>
class LayerItem;
class ItemWithMaterial;
......
......@@ -15,9 +15,9 @@
#ifndef BORNAGAIN_GUI_MODEL_SESSION_SESSIONITEMUTILS_H
#define BORNAGAIN_GUI_MODEL_SESSION_SESSIONITEMUTILS_H
#include <heinz/Vectors3D.h>
#include <QString>
#include <QVariant>
#include <heinz/Vectors3D.h>
class SessionItem;
class GroupInfo;
......
......@@ -15,9 +15,9 @@
#ifndef BORNAGAIN_GUI_MODEL_SESSION_SESSIONXML_H
#define BORNAGAIN_GUI_MODEL_SESSION_SESSIONXML_H
#include <QVariant>
#include <heinz/Complex.h>
#include <heinz/Vectors3D.h>
#include <QVariant>
class QXmlStreamWriter;
class QXmlStreamReader;
......
......@@ -15,8 +15,8 @@
#ifndef BORNAGAIN_GUI_MODEL_TYPES_VECTORITEM_H
#define BORNAGAIN_GUI_MODEL_TYPES_VECTORITEM_H
#include <heinz/Vectors3D.h>
#include "GUI/Model/Session/SessionItem.h"
#include <heinz/Vectors3D.h>
class BA_CORE_API_ VectorItem : public SessionItem {
private:
......
......@@ -14,8 +14,8 @@
#include "GUI/View/Fit/FitSessionController.h"
#include "GUI/Model/Data/IntensityDataItem.h"
#include "GUI/Model/Fit/FitParameterItem.h"
#include "GUI/Model/Fit/FitParameterContainerItem.h"
#include "GUI/Model/Fit/FitParameterItem.h"
#include "GUI/Model/Fit/FitSuiteItem.h"
#include "GUI/Model/Job/JobItem.h"
#include "GUI/Util/Error.h"
......
......@@ -229,7 +229,7 @@ void SpecularDataImportWidget::updatePreview()
if (m_loader) {
auto* oldModel = m_ui->dataResultView->selectionModel(); // sic!! according to Qt docu
// of QAbstractItemView::setModel
// of QAbstractItemView::setModel
auto* resultModel = m_loader->createResultModel();
if (resultModel != nullptr) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment