Skip to content

Commit 6e31d7a

Browse files
committed
Set column limit to 120
1 parent b54145d commit 6e31d7a

9 files changed

Lines changed: 34 additions & 52 deletions

File tree

‎.clang-format‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ BreakConstructorInitializersBeforeComma: true
4444
BreakConstructorInitializers: BeforeColon
4545
BreakAfterJavaFieldAnnotations: false
4646
BreakStringLiterals: true
47-
ColumnLimit: 132
47+
ColumnLimit: 120
4848
CommentPragmas: '^ IWYU pragma:'
4949
CompactNamespaces: false
5050
ConstructorInitializerAllOnOneLineOrOnePerLine: true

‎ElementsExamples/ElementsExamples/ClassExample.h‎

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727
#ifndef ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_CLASSEXAMPLE_H_
2828
#define ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_CLASSEXAMPLE_H_
2929

30-
#include <string> // for std::string
31-
#include <vector> // for std::vector
32-
#include <memory> // for std::unique_ptr
30+
#include <memory> // for std::unique_ptr
31+
#include <string> // for std::string
32+
#include <vector> // for std::vector
3333

34-
#include <cstdint> // for std::int64_t
34+
#include <cstdint> // for std::int64_t
3535

3636
#include "ElementsKernel/Export.h"
3737

@@ -49,7 +49,6 @@ namespace Examples {
4949
class ELEMENTS_API ClassExample {
5050

5151
public:
52-
5352
/**
5453
* @brief
5554
* Example factory method
@@ -167,7 +166,6 @@ class ELEMENTS_API ClassExample {
167166
}
168167

169168
private:
170-
171169
/**
172170
* @brief Constructor
173171
*
@@ -180,19 +178,16 @@ class ELEMENTS_API ClassExample {
180178
* can be chosen via the factory.
181179
*
182180
*/
183-
ClassExample(const std::int64_t source_id, const double ra) :
184-
m_source_id(source_id), m_ra(ra) {
185-
}
181+
ClassExample(const std::int64_t source_id, const double ra) : m_source_id(source_id), m_ra(ra) {}
186182

187183
/// An example of a static string
188184
static const std::string s_static_string;
189185

190186
/// Source ID as an example of a 64 bits integer
191-
std::int64_t m_source_id { 0 };
187+
std::int64_t m_source_id{0};
192188

193189
/// Source right ascension
194-
double m_ra { 0.0 };
195-
190+
double m_ra{0.0};
196191
};
197192

198193
} // namespace Examples

‎ElementsExamples/ElementsExamples/ClassExample2.h‎

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727
#ifndef ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_CLASSEXAMPLE2_H_
2828
#define ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_CLASSEXAMPLE2_H_
2929

30-
#include <string> // for std::string
31-
#include <vector> // for std::vector
32-
#include <memory> // for std::unique_ptr
30+
#include <memory> // for std::unique_ptr
31+
#include <string> // for std::string
32+
#include <vector> // for std::vector
3333

34-
#include <cstdint> // for std::int64_t
34+
#include <cstdint> // for std::int64_t
3535

3636
#include "ElementsKernel/Export.h"
3737

@@ -49,7 +49,6 @@ namespace Examples {
4949
class ELEMENTS_API ClassExample2 {
5050

5151
public:
52-
5352
/**
5453
* @brief
5554
* Example factory method
@@ -167,7 +166,6 @@ class ELEMENTS_API ClassExample2 {
167166
}
168167

169168
private:
170-
171169
/**
172170
* @brief Constructor
173171
*
@@ -180,19 +178,16 @@ class ELEMENTS_API ClassExample2 {
180178
* can be chosen via the factory.
181179
*
182180
*/
183-
ClassExample2(const std::int64_t source_id, const double ra) :
184-
m_source_id(source_id), m_ra(ra) {
185-
}
181+
ClassExample2(const std::int64_t source_id, const double ra) : m_source_id(source_id), m_ra(ra) {}
186182

187183
/// An example of a static string
188184
static std::string s_static_string;
189185

190186
/// Source ID as an example of a 64 bits integer
191-
std::int64_t m_source_id { 0 };
187+
std::int64_t m_source_id{0};
192188

193189
/// Source right ascension
194-
double m_ra { 0.0 };
195-
190+
double m_ra{0.0};
196191
};
197192

198193
} // namespace Examples

‎ElementsExamples/ElementsExamples/DataSourceUser.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#ifndef ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_DATASOURCEUSER_H_
2828
#define ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_DATASOURCEUSER_H_
2929

30-
#include <cstdlib> // for std::size_t
30+
#include <cstdlib> // for std::size_t
3131

3232
#include "ElementsKernel/Export.h" // For ELEMENTS_API
3333

@@ -88,7 +88,6 @@ class ELEMENTS_API DataSourceUser {
8888
* @return The sum of the values of the records into the DataSource object
8989
*/
9090
double sumRecords(const DataSourceInterface& data_source);
91-
9291
};
9392

9493
} // namespace Examples

‎ElementsExamples/ElementsExamples/ModuleInfo.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ ELEMENTS_API const System::ModuleInfo& getModuleInfo();
3838
} // namespace Examples
3939
} // namespace Elements
4040

41-
4241
#endif // ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_MODULEINFO_H_
4342

4443
/**@}*/

‎ElementsExamples/ElementsExamples/TemplatedDataSourceUser.h‎

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,22 @@ namespace Examples {
3636
* @brief This class has been created to demonstrate unit testing. It manipulate
3737
* an object representing a DataSource using template to achieve polymorphism.
3838
*/
39-
class TemplatedDataSourceUser{
39+
class TemplatedDataSourceUser {
4040
public:
41-
4241
/**
43-
* @brief Compute the sum of the values of the records stored into the provided
44-
* DataSource
45-
*
46-
* @tparam T
47-
* A type representing a DataSource. The type must declare the methods
48-
* + size_t countRecords() const
49-
* + double getRecordValue(size_t index) const
50-
*
51-
* @param data_source
52-
* A reference to a DataSource object.
53-
*
54-
* @return The sum of the values of the records into the DataSource object
55-
*/
42+
* @brief Compute the sum of the values of the records stored into the provided
43+
* DataSource
44+
*
45+
* @tparam T
46+
* A type representing a DataSource. The type must declare the methods
47+
* + size_t countRecords() const
48+
* + double getRecordValue(size_t index) const
49+
*
50+
* @param data_source
51+
* A reference to a DataSource object.
52+
*
53+
* @return The sum of the values of the records into the DataSource object
54+
*/
5655
template <typename T>
5756
double sumRecords(const T& data_source);
5857
};

‎ElementsExamples/ElementsExamples/UnitTestExample.h‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
#ifndef ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_UNITTESTEXAMPLE_H_
2727
#define ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_UNITTESTEXAMPLE_H_
2828

29-
#include <vector>
3029
#include "ElementsKernel/Export.h"
30+
#include <vector>
3131

3232
namespace Elements {
3333
namespace Examples {
@@ -40,7 +40,6 @@ namespace Examples {
4040
class ELEMENTS_API UnitTestExample {
4141

4242
public:
43-
4443
/**
4544
* @brief
4645
* Returns a particular version of the "average" of the vector values
@@ -60,7 +59,6 @@ class ELEMENTS_API UnitTestExample {
6059
* If the given vector is empty
6160
*/
6261
double average(const std::vector<int>& v);
63-
6462
};
6563

6664
} // namespace Examples

‎ElementsExamples/ElementsExamples/callBackExample.h‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,19 @@
2727
#ifndef ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_CALLBACKEXAMPLE_H_
2828
#define ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_CALLBACKEXAMPLE_H_
2929

30-
#include <vector>
3130
#include <functional>
31+
#include <vector>
3232

3333
#include "ElementsKernel/Export.h"
3434

3535
namespace Elements {
3636
namespace Examples {
3737

38-
ELEMENTS_API double testCallBack(std::vector<double> x, const std::function<double(std::vector<double>)> &fun);
38+
ELEMENTS_API double testCallBack(std::vector<double> x, const std::function<double(std::vector<double>)>& fun);
3939

4040
} // namespace Examples
4141
} // namespace Elements
4242

43-
44-
45-
4643
#endif // ELEMENTSEXAMPLES_ELEMENTSEXAMPLES_CALLBACKEXAMPLE_H_
4744

4845
/**@}*/

‎ElementsKernel/auxdir/ElementsKernel/templates/clang-format‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ BreakConstructorInitializersBeforeComma: true
4444
BreakConstructorInitializers: BeforeColon
4545
BreakAfterJavaFieldAnnotations: false
4646
BreakStringLiterals: true
47-
ColumnLimit: 132
47+
ColumnLimit: 120
4848
CommentPragmas: '^ IWYU pragma:'
4949
CompactNamespaces: false
5050
ConstructorInitializerAllOnOneLineOrOnePerLine: true

0 commit comments

Comments
 (0)