Skip to content

Commit 48573d6

Browse files
committed
add: change access modifier offset
1 parent 0b19d38 commit 48573d6

File tree

12 files changed

+21
-21
lines changed

12 files changed

+21
-21
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
Language: Cpp
3-
AccessModifierOffset: 0
3+
AccessModifierOffset: -4
44
AlignAfterOpenBracket: Align
55
AlignArrayOfStructures: None
66
AlignConsecutiveAssignments:

include/ext/memory/tagged_pointer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class tagged_pointer {
2929
return ret | (tag & mask);
3030
};
3131

32-
public:
32+
public:
3333
static constexpr std::uintptr_t alignment = Alignment;
3434
static constexpr std::uintptr_t mask = Alignment - 1;
3535

include/ext/structures/binary_index_tree.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ inline void bit_set(Iterator begin, Iterator end, std::size_t index, T value) {
9393

9494
template <typename T>
9595
class binary_index_tree {
96-
public:
96+
public:
9797
binary_index_tree(std::size_t size = 8) {
9898
std::size_t new_size = size;
9999

@@ -159,7 +159,7 @@ class binary_index_tree {
159159
return _storage;
160160
}
161161
#endif // EXT_STRUCTURES_BINARY_INDEX_TREE_TEST
162-
private:
162+
private:
163163
void grow_fill(std::size_t index) {
164164
if (index >= _storage.size()) {
165165
EXT_ASSERT(ext::util::is_power_of_two(_storage.size()));

include/ext/structures/lru_cache.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace ext::structures {
1414

1515
template <typename Key, typename Value>
1616
class lru_cache {
17-
public:
17+
public:
1818
lru_cache(size_t max_size) : _max_size{max_size} {}
1919
lru_cache(lru_cache const&) = delete;
2020

@@ -175,7 +175,7 @@ class lru_cache {
175175
return _map.size();
176176
}
177177

178-
private:
178+
private:
179179
std::list<std::pair<Key, Value>> _list;
180180
std::unordered_map<Key, decltype(_list.begin())> _map;
181181
size_t _max_size;

include/ext/util/defer.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ struct defer {
6161
}
6262
}
6363

64-
private:
64+
private:
6565
Functor functor;
6666
bool active;
6767

include/ext/util/except.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace ext { namespace util {
1212
*/
1313

1414
class not_implemented_exception : public std::logic_error {
15-
public:
15+
public:
1616
explicit not_implemented_exception() : std::logic_error("not implemented"){};
1717
explicit not_implemented_exception(std::string const& arg) : std::logic_error(arg){};
1818
explicit not_implemented_exception(char const* arg) : std::logic_error(arg){};
@@ -24,7 +24,7 @@ class not_implemented_exception : public std::logic_error {
2424
};
2525

2626
class debug_exception : public std::logic_error {
27-
public:
27+
public:
2828
explicit debug_exception(std::string const& arg) : std::logic_error(arg){};
2929
explicit debug_exception(char const* arg) : std::logic_error(arg){};
3030
debug_exception(debug_exception const&) = default;
@@ -35,7 +35,7 @@ class debug_exception : public std::logic_error {
3535
};
3636

3737
class permission_denied_exception : public std::runtime_error {
38-
public:
38+
public:
3939
explicit permission_denied_exception(std::string const& arg) : std::runtime_error(arg){};
4040
explicit permission_denied_exception(char const* arg) : std::runtime_error(arg){};
4141
permission_denied_exception(permission_denied_exception const&) = default;
@@ -46,7 +46,7 @@ class permission_denied_exception : public std::runtime_error {
4646
};
4747

4848
class cat_not_connect_exception : public std::runtime_error {
49-
public:
49+
public:
5050
explicit cat_not_connect_exception(std::string const& arg) : std::runtime_error(arg){};
5151
explicit cat_not_connect_exception(char const* arg) : std::runtime_error(arg){};
5252
cat_not_connect_exception(cat_not_connect_exception const&) = default;

include/ext/util/memstream.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct imemstream : std::basic_istream<T> {
3737
this->init(&buffer);
3838
}
3939

40-
private:
40+
private:
4141
membuf<T> buffer;
4242
};
4343

include/ext/util/result.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ struct typed_result {
135135
value_type value;
136136
bool valid = true;
137137

138-
private:
138+
private:
139139
result _result;
140140

141-
public:
141+
public:
142142
//// constructors
143143
typed_result() = default;
144144

include/ext/util/scoped_timer.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,17 @@ inline void default_callback(scoped_timer_timings const& times) {
7272

7373
template <typename callback_type>
7474
class scoped_timer {
75-
public:
75+
public:
7676
using clock = std::chrono::high_resolution_clock;
7777
using clock_string_vec = std::vector<std::pair<clock::time_point, std::string>>;
7878

79-
private:
79+
private:
8080
callback_type callback;
8181
clock_string_vec timepoints_with_description;
8282
bool enabled_in_dtor = true;
8383
bool add_dtor_entry = true;
8484

85-
public:
85+
public:
8686
scoped_timer(callback_type cb = &_detail::scoped_timer::default_callback, std::string const& name = ""s)
8787
: callback(cb) {
8888
init(name);
@@ -172,7 +172,7 @@ class scoped_timer {
172172
}
173173
}
174174

175-
private:
175+
private:
176176
// get difference between time-points in nanoseconds
177177
static std::uint64_t get_time_diff(clock::time_point const& t0, clock::time_point const& t1) {
178178
return static_cast<std::uint64_t>(std::chrono::duration_cast<std::chrono::nanoseconds>(t1 - t0).count());

include/ext/util/tracing_classes.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class tracing_class {
1313
T _value;
1414
static unsigned const _width = 28;
1515

16-
public:
16+
public:
1717
// default constructor
1818
tracing_class() : _value() {
1919
std::cout << std::setw(_width) << "Default Constructor:" << _value << std::endl;

0 commit comments

Comments
 (0)