Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: bunch of warnings when compiled with -Wshadow #41

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/poolstl/execution
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace poolstl {
*/
struct parallel_policy : public poolstl_policy {
parallel_policy() = default;
explicit parallel_policy(ttp::task_thread_pool* on_pool, bool par_ok): on_pool(on_pool), par_ok(par_ok) {}
explicit parallel_policy(ttp::task_thread_pool* aOn_pool, bool aPar_ok): on_pool(aOn_pool), par_ok(aPar_ok) {}

parallel_policy on(ttp::task_thread_pool& pool) const {
return parallel_policy{&pool, par_ok};
Expand Down Expand Up @@ -101,8 +101,8 @@ namespace poolstl {
* - Barely any algorithms are supported.
*/
struct pure_threads_policy : public poolstl_policy {
explicit pure_threads_policy(unsigned int num_threads, bool par_ok): num_threads(num_threads),
par_ok(par_ok) {}
explicit pure_threads_policy(unsigned int aNum_threads, bool aPar_ok): num_threads(aNum_threads),
par_ok(aPar_ok) {}

POOLSTL_NO_DISCARD unsigned int get_num_threads() const {
if (num_threads == 0) {
Expand Down
4 changes: 2 additions & 2 deletions include/poolstl/internal/ttp_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ namespace poolstl {
auto& task_pool = *policy.pool();

for (const auto& args : args_list) {
futures.emplace_back(task_pool.submit([](Op op, const auto& args_fwd) {
std::apply(op, args_fwd);
futures.emplace_back(task_pool.submit([](Op aOp, const auto& aArgs_fwd) {
std::apply(aOp, aArgs_fwd);
}, op, args));
}

Expand Down
4 changes: 2 additions & 2 deletions include/poolstl/internal/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ namespace poolstl {
using difference_type = typename std::iterator_traits<Iterator>::difference_type;
using pointer = value_type*;
using reference = value_type&;
explicit getting_iter(Iterator iter) : iter(iter) {}
explicit getting_iter(Iterator aIter) : iter(aIter) {}

getting_iter operator++() { ++iter; return *this; }
getting_iter operator++(int) { getting_iter ret(*this); ++iter; return ret; }
Expand Down Expand Up @@ -114,7 +114,7 @@ namespace poolstl {
*/
template <class Compare, class T>
struct pivot_predicate {
pivot_predicate(Compare comp, const T& pivot) : comp(comp), pivot(pivot) {}
pivot_predicate(Compare aComp, const T& aPivot) : comp(aComp), pivot(aPivot) {}

bool operator()(const T& em) {
return comp(em, pivot);
Expand Down