Skip to content

Commit 7804c40

Browse files
committed
Applied clang-format
1 parent da7e015 commit 7804c40

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

cpp/autosar/test/rules/M0-1-3/test.cpp

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,41 +46,35 @@ void test_side_effect_init() {
4646
// have side effects
4747
}
4848

49-
#include <cstdio>
5049
#include <array>
51-
template <int t>
52-
class CharBuffer
53-
{
54-
public:
50+
#include <cstdio>
51+
template <int t> class CharBuffer {
52+
public:
5553
int member[t];
56-
CharBuffer():member{0}{}
54+
CharBuffer() : member{0} {}
5755
};
5856

59-
int test_constexpr_in_template_inst()
60-
{
57+
int test_constexpr_in_template_inst() {
6158
constexpr int line_length = 1024U; // COMPLIANT - used in template inst.
6259
// of buffer.
6360
CharBuffer<line_length> buffer{};
6461
return buffer.member[0];
6562
}
6663

6764
enum DataType : unsigned char {
68-
int8,
69-
int16,
65+
int8,
66+
int16,
7067
};
7168

72-
template <typename... Types>
73-
int test_constexpr_in_static_assert()
74-
{
75-
const std::array <DataType, sizeof...(Types)> lldts {int8};
76-
const std::array <DataType, sizeof...(Types)> llams {int16};
69+
template <typename... Types> int test_constexpr_in_static_assert() {
70+
const std::array<DataType, sizeof...(Types)> lldts{int8};
71+
const std::array<DataType, sizeof...(Types)> llams{int16};
7772
constexpr std::size_t mssu = 64 * 1024; // COMPLIANT - used in static assert.
7873
static_assert((sizeof(lldts) + sizeof(llams)) <= mssu, "assert");
7974
return 0;
8075
}
8176

82-
int baz()
83-
{
77+
int baz() {
8478
test_constexpr_in_static_assert<int>();
8579
return 0;
8680
}

0 commit comments

Comments
 (0)