-
Notifications
You must be signed in to change notification settings - Fork 34
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
Switch to new cubos system syntax #919
Conversation
fc9c30b
to
0229e9f
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (1/14)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (2/14)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (3/14)
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (4/14)
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (5/14)
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (6/14)
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #919 +/- ##
==========================================
+ Coverage 48.91% 49.68% +0.76%
==========================================
Files 134 134
Lines 7999 8009 +10
==========================================
+ Hits 3913 3979 +66
+ Misses 4086 4030 -56 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (7/14)
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (8/14)
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
/// @return Reference to this object, for chaining. | ||
template <typename F> | ||
SystemBuilder& runIf(F func); | ||
|
||
private: | ||
core::ecs::Dispatcher& mDispatcher; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private field mDispatcher
is not used
/// @return Reference to this object, for chaining. | ||
template <typename F> | ||
SystemBuilder& runIf(F func); | ||
|
||
private: | ||
core::ecs::Dispatcher& mDispatcher; | ||
std::vector<std::string>& mTags; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private field mTags
is not used
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (9/14)
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (10/14)
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (11/14)
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (12/14)
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (13/14)
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clang-Tidy
found issue(s) with the introduced code (14/14)
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
{ | ||
// Wrap the system and put it in the pending queue | ||
auto* system = new System{nullptr, std::make_shared<SystemWrapper<F>>(func), {}}; | ||
auto* system = new System{nullptr, func, {}}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameter func
is passed by value and only copied once; consider moving it to avoid unnecessary copies
auto* system = new System{nullptr, func, {}}; | |
auto* system = new System{nullptr, std::move(func), {}}; |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit(F func); | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func); | |
const std::shared_ptr<AnySystemWrapper<bool>>& func); |
template <typename F> | ||
std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit(F func) | ||
inline std::bitset<CUBOS_CORE_DISPATCHER_MAX_CONDITIONS> Dispatcher::assignConditionBit( | ||
std::shared_ptr<AnySystemWrapper<bool>> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the parameter func
is copied for each invocation but only used as a const reference; consider making it a const reference
std::shared_ptr<AnySystemWrapper<bool>> func) | |
const std::shared_ptr<AnySystemWrapper<bool>>& func) |
0229e9f
to
950bf00
Compare
Description
Depends on #862, will merge after it is merged.
Changes the
Cubos
system syntax to define the systems inline with the rest of the configuration.Will be useful to later allow specifying the traversal direction of queries and other options, such as filtering out components.
Had to change all plugins, which means this is a gigantic PR. 😔
Checklist
Write new samples.