Commit 522b19d0 authored by Jordan P. Lefebvre's avatar Jordan P. Lefebvre
Browse files

Updating .clang-format option ConstructorInitializerAllOnOneLineOrOnePerLine...

Updating .clang-format option ConstructorInitializerAllOnOneLineOrOnePerLine to be false. Applying updated format.
parent 7d9e31b0
Pipeline #11085 passed with stage
in 3 minutes and 29 seconds
...@@ -46,7 +46,7 @@ BreakStringLiterals: true ...@@ -46,7 +46,7 @@ BreakStringLiterals: true
ColumnLimit: 80 ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:' CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4 ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4 ContinuationIndentWidth: 4
Cpp11BracedListStyle: true Cpp11BracedListStyle: true
......
...@@ -150,7 +150,10 @@ class Timer { ...@@ -150,7 +150,10 @@ class Timer {
size_t mIntervals; size_t mIntervals;
public: public:
Timer() : mRunning(false), mDuration(0), mIntervals(0) {} Timer()
: mRunning(false)
, mDuration(0)
, mIntervals(0) {}
void start() { void start() {
radix_check(!mRunning); radix_check(!mRunning);
mRunning = true; mRunning = true;
......
...@@ -3,7 +3,9 @@ ...@@ -3,7 +3,9 @@
namespace radix { namespace radix {
CommandLine::CommandLine(int argc, char **argv) : mArgc(argc), mArgv(argv) { CommandLine::CommandLine(int argc, char **argv)
: mArgc(argc)
, mArgv(argv) {
if (argc < 1) return; if (argc < 1) return;
mExecutable = argv[0]; mExecutable = argv[0];
for (int i = 1; i < argc; i++) { for (int i = 1; i < argc; i++) {
......
...@@ -12,14 +12,30 @@ ...@@ -12,14 +12,30 @@
#include <iomanip> #include <iomanip>
#include <sstream> #include <sstream>
namespace radix { namespace radix {
AABB::AABB(void) : x0(-1), x1(1), y0(-1), y1(1), z0(-1), z1(1) {} AABB::AABB(void)
: x0(-1)
, x1(1)
, y0(-1)
, y1(1)
, z0(-1)
, z1(1) {}
AABB::AABB(const Real _x0, const Real _x1, const Real _y0, const Real _y1, AABB::AABB(const Real _x0, const Real _x1, const Real _y0, const Real _y1,
const Real _z0, const Real _z1) const Real _z0, const Real _z1)
: x0(_x0), x1(_x1), y0(_y0), y1(_y1), z0(_z0), z1(_z1) {} : x0(_x0)
, x1(_x1)
, y0(_y0)
, y1(_y1)
, z0(_z0)
, z1(_z1) {}
AABB::AABB(const Point3D p0, const Point3D p1) AABB::AABB(const Point3D p0, const Point3D p1)
: x0(p0.x), x1(p1.x), y0(p0.y), y1(p1.y), z0(p0.z), z1(p1.z) {} : x0(p0.x)
, x1(p1.x)
, y0(p0.y)
, y1(p1.y)
, z0(p0.z)
, z1(p1.z) {}
AABB::AABB(const AABB &aabb) AABB::AABB(const AABB &aabb)
: x0(aabb.x0) : x0(aabb.x0)
......
...@@ -20,7 +20,8 @@ AABB Grid::bounds() const { return mBounds; } ...@@ -20,7 +20,8 @@ AABB Grid::bounds() const { return mBounds; }
void Grid::setBounds(const AABB &bounds) { mBounds = bounds; } void Grid::setBounds(const AABB &bounds) { mBounds = bounds; }
Grid::Grid() : mTranslation(0, 0, 0) {} Grid::Grid()
: mTranslation(0, 0, 0) {}
Grid::Grid(const Grid &orig) Grid::Grid(const Grid &orig)
: mTranslation(0, 0, 0) : mTranslation(0, 0, 0)
, mXPlanes(orig.mXPlanes) , mXPlanes(orig.mXPlanes)
...@@ -62,7 +63,9 @@ Grid::Grid(Point3D lowerLeftCorner, Real deltaX, Real deltaY, Real deltaZ, ...@@ -62,7 +63,9 @@ Grid::Grid(Point3D lowerLeftCorner, Real deltaX, Real deltaY, Real deltaZ,
Grid::Grid(const std::vector<Real> &xplanes, const std::vector<Real> &yplanes, Grid::Grid(const std::vector<Real> &xplanes, const std::vector<Real> &yplanes,
const std::vector<Real> &zplanes) const std::vector<Real> &zplanes)
: mXPlanes(xplanes), mYPlanes(yplanes), mZPlanes(zplanes) { : mXPlanes(xplanes)
, mYPlanes(yplanes)
, mZPlanes(zplanes) {
radix_check(xplanes.size() >= 2); radix_check(xplanes.size() >= 2);
radix_check(yplanes.size() >= 2); radix_check(yplanes.size() >= 2);
radix_check(zplanes.size() >= 2); radix_check(zplanes.size() >= 2);
......
...@@ -14,12 +14,20 @@ ...@@ -14,12 +14,20 @@
#include "radixbug/bug.hh" #include "radixbug/bug.hh"
namespace radix { namespace radix {
Interval::Interval() : a(minReal), b(maxReal), id(0) {} Interval::Interval()
: a(minReal)
, b(maxReal)
, id(0) {}
Interval::Interval(const Interval &orig) : a(orig.a), b(orig.b), id(orig.id) {} Interval::Interval(const Interval &orig)
: a(orig.a)
, b(orig.b)
, id(orig.id) {}
Interval::Interval(Real start, Real finish, Identifier id) Interval::Interval(Real start, Real finish, Identifier id)
: a(start), b(finish), id(id) {} : a(start)
, b(finish)
, id(id) {}
Interval::~Interval() {} Interval::~Interval() {}
std::string Interval::toString() const { std::string Interval::toString() const {
......
...@@ -25,7 +25,8 @@ struct IconEvaluationResult { ...@@ -25,7 +25,8 @@ struct IconEvaluationResult {
class RADIX_PUBLIC GllsConstraintError : public std::logic_error { class RADIX_PUBLIC GllsConstraintError : public std::logic_error {
public: public:
using std::logic_error::logic_error; using std::logic_error::logic_error;
GllsConstraintError(const std::string &msg) : std::logic_error(msg){}; GllsConstraintError(const std::string &msg)
: std::logic_error(msg){};
}; };
/** Given the data and its absolute covariance; calculated data, parameter /** Given the data and its absolute covariance; calculated data, parameter
......
...@@ -9,7 +9,9 @@ ...@@ -9,7 +9,9 @@
namespace radix { namespace radix {
GllsMatrix::GllsMatrix(size_t nrows, size_t ncols, double val) GllsMatrix::GllsMatrix(size_t nrows, size_t ncols, double val)
: m_data(nrows, VectorDouble(ncols, val)), m_nrows(nrows), m_ncols(ncols) {} : m_data(nrows, VectorDouble(ncols, val))
, m_nrows(nrows)
, m_ncols(ncols) {}
GllsMatrix::GllsMatrix(const VectorVectorDouble &data, size_t ncols) GllsMatrix::GllsMatrix(const VectorVectorDouble &data, size_t ncols)
: m_data(data.begin(), data.end()) : m_data(data.begin(), data.end())
...@@ -253,7 +255,9 @@ extern "C" void ML_DSYTRF( ...@@ -253,7 +255,9 @@ extern "C" void ML_DSYTRF(
int *info); // 0 indicates successful exit (out) int *info); // 0 indicates successful exit (out)
FactorizedMatrix::FactorizedMatrix(const GllsMatrix &matrix) FactorizedMatrix::FactorizedMatrix(const GllsMatrix &matrix)
: GllsMatrix(matrix), m_factorized(m_nrows * m_nrows), m_ipiv(m_nrows) { : GllsMatrix(matrix)
, m_factorized(m_nrows * m_nrows)
, m_ipiv(m_nrows) {
// check and copy the matrix // check and copy the matrix
radix_check(m_nrows > 0); radix_check(m_nrows > 0);
radix_check(m_nrows == m_ncols); radix_check(m_nrows == m_ncols);
......
...@@ -12,7 +12,8 @@ class RADIX_PUBLIC LapackError : public std::runtime_error { ...@@ -12,7 +12,8 @@ class RADIX_PUBLIC LapackError : public std::runtime_error {
public: public:
LapackError(const std::string &what_arg, int info = 0) LapackError(const std::string &what_arg, int info = 0)
: std::runtime_error(what_arg), m_info(info) {} : std::runtime_error(what_arg)
, m_info(info) {}
// //
int info() const { return m_info; } int info() const { return m_info; }
}; };
......
...@@ -10,7 +10,9 @@ ...@@ -10,7 +10,9 @@
#include "radixio/commandline.hh" #include "radixio/commandline.hh"
namespace radix { namespace radix {
CommandLine::CommandLine(int argc, char **argv) : mArgc(argc), mArgv(argv) { CommandLine::CommandLine(int argc, char **argv)
: mArgc(argc)
, mArgv(argv) {
this->mExecutable = std::string(argv[0]); this->mExecutable = std::string(argv[0]);
for (int i = 1; i < argc; i++) { for (int i = 1; i < argc; i++) {
std::string temp = std::string(argv[i]); std::string temp = std::string(argv[i]);
......
...@@ -73,6 +73,7 @@ bool radix::CSVFile::data(std::vector<std::vector<std::string>> &data) const { ...@@ -73,6 +73,7 @@ bool radix::CSVFile::data(std::vector<std::vector<std::string>> &data) const {
return true; return true;
} }
radix::CSVFile::CSVFile(const std::string &file) : mFile(file) {} radix::CSVFile::CSVFile(const std::string &file)
: mFile(file) {}
} // namespace radix } // namespace radix
...@@ -69,7 +69,9 @@ std::vector<float> GFSFile::mFact = { ...@@ -69,7 +69,9 @@ std::vector<float> GFSFile::mFact = {
1.0f, 1.0f, 1.0f, 100.f, 1.0f, 1.0f, 1.0f, 1.0f, 3600.f, 1.0f, 1.0f, 1.0f, 100.f, 1.0f, 1.0f, 1.0f, 1.0f, 3600.f,
1000.f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1000.f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 3600.f, 60000.f}; 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 3600.f, 60000.f};
GFSFile::GFSFile(std::string file) : mFile(file), mStrcmp(9, 0.0f) { GFSFile::GFSFile(std::string file)
: mFile(file)
, mStrcmp(9, 0.0f) {
radix_tagged_line("GFSFile(" << file << ")"); radix_tagged_line("GFSFile(" << file << ")");
// initialize data structure // initialize data structure
eafstream *rstream = eafstream *rstream =
......
...@@ -217,5 +217,8 @@ void HCDump::reload() { ...@@ -217,5 +217,8 @@ void HCDump::reload() {
radix_line("Total mass: " << total); radix_line("Total mass: " << total);
} }
HCDump::HCDump(const std::string &path) : mPath(path) { reload(); } HCDump::HCDump(const std::string &path)
: mPath(path) {
reload();
}
} // namespace radix } // namespace radix
...@@ -15,13 +15,19 @@ namespace radix { ...@@ -15,13 +15,19 @@ namespace radix {
/** /**
* Default constructor * Default constructor
*/ */
Normal::Normal() : x(0.0), y(0.0), z(0.0) {} Normal::Normal()
: x(0.0)
, y(0.0)
, z(0.0) {}
/** /**
* Constructor * Constructor
* @param a * @param a
*/ */
Normal::Normal(Real a) : x(a), y(a), z(a) {} Normal::Normal(Real a)
: x(a)
, y(a)
, z(a) {}
/** /**
* Constructor * Constructor
...@@ -29,19 +35,28 @@ Normal::Normal(Real a) : x(a), y(a), z(a) {} ...@@ -29,19 +35,28 @@ Normal::Normal(Real a) : x(a), y(a), z(a) {}
* @param _y * @param _y
* @param _z * @param _z
*/ */
Normal::Normal(Real _x, Real _y, Real _z) : x(_x), y(_y), z(_z) {} Normal::Normal(Real _x, Real _y, Real _z)
: x(_x)
, y(_y)
, z(_z) {}
/** /**
* Copy constructor * Copy constructor
* @param n * @param n
*/ */
Normal::Normal(const Normal &n) : x(n.x), y(n.y), z(n.z) {} Normal::Normal(const Normal &n)
: x(n.x)
, y(n.y)
, z(n.z) {}
/** /**
* Copy Vector3D constructor * Copy Vector3D constructor
* @param v * @param v
*/ */
Normal::Normal(const Vector3D &v) : x(v.x), y(v.y), z(v.z) {} Normal::Normal(const Vector3D &v)
: x(v.x)
, y(v.y)
, z(v.z) {}
/** /**
* Destructor * Destructor
......
...@@ -14,13 +14,19 @@ namespace radix { ...@@ -14,13 +14,19 @@ namespace radix {
/** /**
* Default Constructor * Default Constructor
*/ */
Point3D::Point3D() : x(0), y(0), z(0) {} Point3D::Point3D()
: x(0)
, y(0)
, z(0) {}
/** /**
* Constructor * Constructor
* @param a * @param a
*/ */
Point3D::Point3D(const Real a) : x(a), y(a), z(a) {} Point3D::Point3D(const Real a)
: x(a)
, y(a)
, z(a) {}
/** /**
* Constructor * Constructor
...@@ -28,13 +34,19 @@ Point3D::Point3D(const Real a) : x(a), y(a), z(a) {} ...@@ -28,13 +34,19 @@ Point3D::Point3D(const Real a) : x(a), y(a), z(a) {}
* @param b * @param b
* @param c * @param c
*/ */
Point3D::Point3D(const Real a, const Real b, const Real c) : x(a), y(b), z(c) {} Point3D::Point3D(const Real a, const Real b, const Real c)
: x(a)
, y(b)
, z(c) {}
/** /**
* Copy constructor * Copy constructor
* @param p * @param p
*/ */
Point3D::Point3D(const Point3D &p) : x(p.x), y(p.y), z(p.z) {} Point3D::Point3D(const Point3D &p)
: x(p.x)
, y(p.y)
, z(p.z) {}
/** /**
* Destructor * Destructor
......
...@@ -52,7 +52,10 @@ class RADIX_PUBLIC Point3D { ...@@ -52,7 +52,10 @@ class RADIX_PUBLIC Point3D {
* Copy Constructor * Copy Constructor
* @param p * @param p
*/ */
Point3D(const Vector3D &v) : x(v.x), y(v.y), z(v.z) {} Point3D(const Vector3D &v)
: x(v.x)
, y(v.y)
, z(v.z) {}
/** /**
* Destructor * Destructor
*/ */
......
...@@ -3,11 +3,17 @@ ...@@ -3,11 +3,17 @@
#include <iomanip> #include <iomanip>
#include <sstream> #include <sstream>
namespace radix { namespace radix {
Ray::Ray(void) : o(0.0), d(0.0, 0.0, 1.0) {} Ray::Ray(void)
: o(0.0)
, d(0.0, 0.0, 1.0) {}
Ray::Ray(const Point3D &origin, const Vector3D &dir) : o(origin), d(dir) {} Ray::Ray(const Point3D &origin, const Vector3D &dir)
: o(origin)
, d(dir) {}
Ray::Ray(const Ray &ray) : o(ray.o), d(ray.d) {} Ray::Ray(const Ray &ray)
: o(ray.o)
, d(ray.d) {}
Ray &Ray::operator=(const Ray &rhs) { Ray &Ray::operator=(const Ray &rhs) {
if (this == &rhs) return (*this); if (this == &rhs) return (*this);
......
...@@ -19,36 +19,53 @@ namespace radix { ...@@ -19,36 +19,53 @@ namespace radix {
/* /*
* Default constructor * Default constructor
*/ */
Vector3D::Vector3D(void) : x(0.0), y(0.0), z(0.0) {} Vector3D::Vector3D(void)
: x(0.0)
, y(0.0)
, z(0.0) {}
/** /**
* Constructor * Constructor
*/ */
Vector3D::Vector3D(Real a) : x(a), y(a), z(a) {} Vector3D::Vector3D(Real a)
: x(a)
, y(a)
, z(a) {}
/** /**
* Constructor * Constructor
*/ */
Vector3D::Vector3D(Real _x, Real _y, Real _z) : x(_x), y(_y), z(_z) {} Vector3D::Vector3D(Real _x, Real _y, Real _z)
: x(_x)
, y(_y)
, z(_z) {}
/** /**
* Copy constructor * Copy constructor
*/ */
Vector3D::Vector3D(const Vector3D &vector) Vector3D::Vector3D(const Vector3D &vector)
: x(vector.x), y(vector.y), z(vector.z) {} : x(vector.x)
, y(vector.y)
, z(vector.z) {}
/** /**
* Constructor * Constructor
* @brief constructs a vector from a normal * @brief constructs a vector from a normal
*/ */
Vector3D::Vector3D(const Normal &n) : x(n.x), y(n.y), z(n.z) {} Vector3D::Vector3D(const Normal &n)
: x(n.x)
, y(n.y)
, z(n.z) {}
/** /**
* Constructor * Constructor
* @brief constructs a vector from a point * @brief constructs a vector from a point
* this is used in the ConcaveHemisphere hit functions * this is used in the ConcaveHemisphere hit functions
*/ */
Vector3D::Vector3D(const Point3D &p) : x(p.x), y(p.y), z(p.z) {} Vector3D::Vector3D(const Point3D &p)
: x(p.x)
, y(p.y)
, z(p.z) {}
/** /**
* Destructor * Destructor
......
...@@ -18,9 +18,11 @@ namespace radix { ...@@ -18,9 +18,11 @@ namespace radix {
namespace Private { namespace Private {
#ifdef USE_MPI #ifdef USE_MPI
MPIComm::MPIComm() : d_comm(MPI_COMM_WORLD) {} MPIComm::MPIComm()
: d_comm(MPI_COMM_WORLD) {}
MPIComm::MPIComm(MPI_Comm comm) : d_comm(comm) {} MPIComm::MPIComm(MPI_Comm comm)
: d_comm(comm) {}
MPIComm::~MPIComm() {} // destructor MPIComm::~MPIComm() {} // destructor
......
...@@ -14,7 +14,8 @@ namespace radix { ...@@ -14,7 +14,8 @@ namespace radix {
namespace Private { namespace Private {
#ifdef USE_MPI #ifdef USE_MPI
MPIEnvironment::MPIEnvironment(int &argc, char **&argv) : owner(false) { MPIEnvironment::MPIEnvironment(int &argc, char **&argv)
: owner(false) {
if (initialized() == false) { if (initialized() == false) {
owner = true; owner = true;
MPI_Init(&argc, &argv); MPI_Init(&argc, &argv);
......
Markdown is supported
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