Skip to content

Commit

Permalink
Fix GCC 13 -Wpessimizing-move in flip and not_fn
Browse files Browse the repository at this point in the history
  • Loading branch information
Morwenn committed Jul 2, 2023
1 parent b5afd1b commit 55aaccf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
11 changes: 1 addition & 10 deletions include/cpp-sort/comparators/flip.h
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022 Morwenn
* Copyright (c) 2021-2023 Morwenn
* SPDX-License-Identifier: MIT
*/
#ifndef CPPSORT_COMPARATORS_FLIP_H_
Expand Down Expand Up @@ -166,15 +166,6 @@ namespace cppsort
func.projection()
);
}

static constexpr auto construct(projection_compare<F1, F2>&& func)
-> type
{
return type(
detail::flip_impl<F1>::construct(std::move(func.comparison())),
std::move(func.projection())
);
}
};
}

Expand Down
11 changes: 1 addition & 10 deletions include/cpp-sort/comparators/not_fn.h
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022 Morwenn
* Copyright (c) 2021-2023 Morwenn
* SPDX-License-Identifier: MIT
*/
#ifndef CPPSORT_COMPARATORS_NOT_FN_H_
Expand Down Expand Up @@ -165,15 +165,6 @@ namespace cppsort
func.projection()
);
}

static constexpr auto construct(projection_compare<F1, F2>&& func)
-> type
{
return type(
detail::not_fn_impl<F1>::construct(std::move(func.comparison())),
std::move(func.projection())
);
}
};
}

Expand Down

0 comments on commit 55aaccf

Please sign in to comment.