Skip to content

Commit 7d44011

Browse files
authored
Merge pull request #44 from museghost/master
2 parents 172ca3f + 7d5e3be commit 7d44011

File tree

6 files changed

+25
-22
lines changed

6 files changed

+25
-22
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@
1111
*.lai
1212
*.la
1313
*.a
14+
15+
# project
16+
.vscode

include/async++/aligned_alloc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ class aligned_array {
3838
: length(0), ptr(nullptr) {}
3939
aligned_array(std::nullptr_t)
4040
: length(0), ptr(nullptr) {}
41-
explicit aligned_array(std::size_t length)
42-
: length(length)
41+
explicit aligned_array(std::size_t length_)
42+
: length(length_)
4343
{
4444
ptr = static_cast<T*>(aligned_alloc(length * sizeof(T), Align));
4545
std::size_t i;

include/async++/continuation_vector.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ class compressed_ptr {
3434

3535
public:
3636
compressed_ptr() = default;
37-
compressed_ptr(void* ptr, std::uintptr_t flags)
38-
: ptr(ptr), flags(flags) {}
37+
compressed_ptr(void* ptr_, std::uintptr_t flags_)
38+
: ptr(ptr_), flags(flags_) {}
3939

4040
template<typename T>
4141
T* get_ptr() const
@@ -62,8 +62,8 @@ class compressed_ptr<Mask, true> {
6262

6363
public:
6464
compressed_ptr() = default;
65-
compressed_ptr(void* ptr, std::uintptr_t flags)
66-
: data(reinterpret_cast<std::uintptr_t>(ptr) | flags) {}
65+
compressed_ptr(void* ptr_, std::uintptr_t flags_)
66+
: data(reinterpret_cast<std::uintptr_t>(ptr_) | flags_) {}
6767

6868
template<typename T>
6969
T* get_ptr() const

include/async++/partitioner.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ class static_partitioner_impl {
5757
std::size_t grain;
5858

5959
public:
60-
static_partitioner_impl(Iter begin, Iter end, std::size_t grain)
61-
: iter_begin(begin), iter_end(end), grain(grain) {}
60+
static_partitioner_impl(Iter begin_, Iter end_, std::size_t grain_)
61+
: iter_begin(begin_), iter_end(end_), grain(grain_) {}
6262
Iter begin() const
6363
{
6464
return iter_begin;
@@ -92,8 +92,8 @@ class auto_partitioner_impl {
9292

9393
public:
9494
// thread_id is initialized to "no thread" and will be set on first split
95-
auto_partitioner_impl(Iter begin, Iter end, std::size_t grain)
96-
: iter_begin(begin), iter_end(end), grain(grain) {}
95+
auto_partitioner_impl(Iter begin_, Iter end_, std::size_t grain_)
96+
: iter_begin(begin_), iter_end(end_), grain(grain_) {}
9797
Iter begin() const
9898
{
9999
return iter_begin;

include/async++/task_base.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ struct LIBASYNC_CACHELINE_ALIGN task_base: public ref_count_base<task_base, task
111111
void run_continuations()
112112
{
113113
continuations.flush_and_lock([this](task_ptr t) {
114-
const task_base_vtable* vtable = t->vtable;
115-
vtable->schedule(this, std::move(t));
114+
const task_base_vtable* vtable_ptr = t->vtable;
115+
vtable_ptr->schedule(this, std::move(t));
116116
});
117117
}
118118

@@ -271,17 +271,17 @@ struct task_result: public task_result_holder<Result> {
271271
}
272272

273273
// Cancel a task with the given exception
274-
void cancel_base(std::exception_ptr&& except)
274+
void cancel_base(std::exception_ptr&& except_)
275275
{
276-
set_exception(std::move(except));
276+
set_exception(std::move(except_));
277277
this->state.store(task_state::canceled, std::memory_order_release);
278278
this->run_continuations();
279279
}
280280

281281
// Set the exception value of the task
282-
void set_exception(std::exception_ptr&& except)
282+
void set_exception(std::exception_ptr&& except_)
283283
{
284-
new(&this->except) std::exception_ptr(std::move(except));
284+
new(&this->except) std::exception_ptr(std::move(except_));
285285
}
286286

287287
// Get the exception a task was canceled with

include/async++/when_all_any.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ struct when_all_func_range {
5858
std::size_t index;
5959
ref_count_ptr<when_all_state<Result>> state;
6060

61-
when_all_func_range(std::size_t index, ref_count_ptr<when_all_state<Result>> state)
62-
: index(index), state(std::move(state)) {}
61+
when_all_func_range(std::size_t index_, ref_count_ptr<when_all_state<Result>> state_)
62+
: index(index_), state(std::move(state_)) {}
6363

6464
// Copy the completed task object to the shared state. The event is
6565
// automatically signaled when all references are dropped.
@@ -72,8 +72,8 @@ template<std::size_t index, typename Task, typename Result>
7272
struct when_all_func_tuple {
7373
ref_count_ptr<when_all_state<Result>> state;
7474

75-
when_all_func_tuple(ref_count_ptr<when_all_state<Result>> state)
76-
: state(std::move(state)) {}
75+
when_all_func_tuple(ref_count_ptr<when_all_state<Result>> state_)
76+
: state(std::move(state_)) {}
7777

7878
// Copy the completed task object to the shared state. The event is
7979
// automatically signaled when all references are dropped.
@@ -105,8 +105,8 @@ struct when_any_func {
105105
std::size_t index;
106106
ref_count_ptr<when_any_state<Result>> state;
107107

108-
when_any_func(std::size_t index, ref_count_ptr<when_any_state<Result>> state)
109-
: index(index), state(std::move(state)) {}
108+
when_any_func(std::size_t index_, ref_count_ptr<when_any_state<Result>> state_)
109+
: index(index_), state(std::move(state_)) {}
110110

111111
// Simply tell the state that our task has finished, it already has a copy
112112
// of the task object.

0 commit comments

Comments
 (0)