-
Notifications
You must be signed in to change notification settings - Fork 180
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
[core_c] Move implementation to lang folder. #1904
base: master
Are you sure you want to change the base?
Conversation
In core, events are now enum class instead of enum.
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 made some suggestions
/** | ||
* @brief eCAL subscriber event callback type. | ||
**/ | ||
enum class Subscriber_Event |
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.
warning: enum 'Subscriber_Event' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]
^
/** | ||
* @brief eCAL publisher event callback type. | ||
**/ | ||
enum class Publisher_Event |
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.
warning: enum 'Publisher_Event' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]
^
/** | ||
* @brief eCAL service client event callback type. | ||
**/ | ||
enum class Client_Event |
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.
warning: enum 'Client_Event' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]
^
/** | ||
* @brief eCAL service server event callback type. | ||
**/ | ||
enum class Server_Event |
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.
warning: enum 'Server_Event' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]
^
/** | ||
* @brief Service call state. | ||
**/ | ||
enum class eCallState |
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.
warning: enum 'eCallState' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]
enum class eCallState
^
@@ -52,7 +62,7 @@ | |||
SServiceResponse() | |||
{ | |||
ret_state = 0; | |||
call_state = call_state_none; | |||
call_state = eCallState::call_state_none; |
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.
warning: 'call_state' should be initialized in an in-class default member initializer [cppcoreguidelines-prefer-member-initializer]
call_state = eCallState::call_state_none; | |
ecal/core/include/ecal/ecal_service_info.h:72:
- eCallState call_state; //!< call state (see eCallState)
+ eCallState call_state{eCallState::call_state_none}; //!< call state (see eCallState)
@@ -366,7 +366,7 @@ namespace eCAL | |||
return(true); | |||
} | |||
|
|||
bool CPublisherImpl::SetEventCallback(eCAL_Publisher_Event type_, const v5::PubEventCallbackT callback_) | |||
bool CPublisherImpl::SetEventCallback(Publisher_Event type_, const v5::PubEventCallbackT callback_) |
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.
warning: the const qualified parameter 'callback_' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param]
ecal/core/src/pubsub/ecal_publisher_impl.h:85:
- bool SetEventCallback(Publisher_Event type_, const v5::PubEventCallbackT callback_);
+ bool SetEventCallback(Publisher_Event type_, const v5::PubEventCallbackT& callback_);
bool CPublisherImpl::SetEventCallback(Publisher_Event type_, const v5::PubEventCallbackT callback_) | |
bool CPublisherImpl::SetEventCallback(Publisher_Event type_, const v5::PubEventCallbackT& callback_) |
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 made some suggestions
There were too many comments to post at once. Showing the first 20 out of 65. Check the log or trigger a new build to see more.
} | ||
|
||
log_proxy_model_->setLogLevelFilter((eCAL_Logging_eLogLevel)log_level_filter); | ||
log_proxy_model_->setLogLevelFilter((eCAL::Logging::eLogLevel)log_level_filter); |
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.
warning: The value '10' provided to the cast expression is not in the valid range of values for 'eLogLevel' [clang-analyzer-optin.core.EnumCastOutOfRange]
^
Additional context
ecal/core/include/ecal/ecal_log_level.h:36: enum declared here
enum eLogLevel
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:390: Calling 'LogWidget::setLogLevelFilter'
;
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:410: Calling 'LogWidget::updateLogLevelFilter'
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Assuming the condition is false
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Taking false branch
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:233: The value 10 is assigned to 'log_level_filter'
{
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:236: The value '10' provided to the cast expression is not in the valid range of values for 'eLogLevel'
^
} | ||
|
||
log_proxy_model_->setLogLevelFilter((eCAL_Logging_eLogLevel)log_level_filter); | ||
log_proxy_model_->setLogLevelFilter((eCAL::Logging::eLogLevel)log_level_filter); |
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.
warning: The value '11' provided to the cast expression is not in the valid range of values for 'eLogLevel' [clang-analyzer-optin.core.EnumCastOutOfRange]
^
Additional context
ecal/core/include/ecal/ecal_log_level.h:36: enum declared here
enum eLogLevel
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:390: Calling 'LogWidget::setLogLevelFilter'
;
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:410: Calling 'LogWidget::updateLogLevelFilter'
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Assuming the condition is false
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Taking false branch
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:233: The value 11 is assigned to 'log_level_filter'
{
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:236: The value '11' provided to the cast expression is not in the valid range of values for 'eLogLevel'
^
} | ||
|
||
log_proxy_model_->setLogLevelFilter((eCAL_Logging_eLogLevel)log_level_filter); | ||
log_proxy_model_->setLogLevelFilter((eCAL::Logging::eLogLevel)log_level_filter); |
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.
warning: The value '12' provided to the cast expression is not in the valid range of values for 'eLogLevel' [clang-analyzer-optin.core.EnumCastOutOfRange]
^
Additional context
ecal/core/include/ecal/ecal_log_level.h:36: enum declared here
enum eLogLevel
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:390: Calling 'LogWidget::setLogLevelFilter'
;
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:410: Calling 'LogWidget::updateLogLevelFilter'
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Assuming the condition is false
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Taking false branch
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:233: The value 12 is assigned to 'log_level_filter'
{
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:236: The value '12' provided to the cast expression is not in the valid range of values for 'eLogLevel'
^
} | ||
|
||
log_proxy_model_->setLogLevelFilter((eCAL_Logging_eLogLevel)log_level_filter); | ||
log_proxy_model_->setLogLevelFilter((eCAL::Logging::eLogLevel)log_level_filter); |
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.
warning: The value '13' provided to the cast expression is not in the valid range of values for 'eLogLevel' [clang-analyzer-optin.core.EnumCastOutOfRange]
^
Additional context
ecal/core/include/ecal/ecal_log_level.h:36: enum declared here
enum eLogLevel
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:390: Calling 'LogWidget::setLogLevelFilter'
;
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:410: Calling 'LogWidget::updateLogLevelFilter'
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Assuming the condition is false
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Taking false branch
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:233: The value 13 is assigned to 'log_level_filter'
{
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:236: The value '13' provided to the cast expression is not in the valid range of values for 'eLogLevel'
^
} | ||
|
||
log_proxy_model_->setLogLevelFilter((eCAL_Logging_eLogLevel)log_level_filter); | ||
log_proxy_model_->setLogLevelFilter((eCAL::Logging::eLogLevel)log_level_filter); |
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.
warning: The value '14' provided to the cast expression is not in the valid range of values for 'eLogLevel' [clang-analyzer-optin.core.EnumCastOutOfRange]
^
Additional context
ecal/core/include/ecal/ecal_log_level.h:36: enum declared here
enum eLogLevel
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:390: Calling 'LogWidget::setLogLevelFilter'
;
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:410: Calling 'LogWidget::updateLogLevelFilter'
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Assuming the condition is false
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Taking false branch
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:233: The value 14 is assigned to 'log_level_filter'
{
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:236: The value '14' provided to the cast expression is not in the valid range of values for 'eLogLevel'
^
} | ||
|
||
log_proxy_model_->setLogLevelFilter((eCAL_Logging_eLogLevel)log_level_filter); | ||
log_proxy_model_->setLogLevelFilter((eCAL::Logging::eLogLevel)log_level_filter); |
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.
warning: The value '249' provided to the cast expression is not in the valid range of values for 'eLogLevel' [clang-analyzer-optin.core.EnumCastOutOfRange]
^
Additional context
ecal/core/include/ecal/ecal_log_level.h:36: enum declared here
enum eLogLevel
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:390: Calling 'LogWidget::setLogLevelFilter'
;
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:410: Calling 'LogWidget::updateLogLevelFilter'
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Assuming the condition is true
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Taking true branch
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:233: The value 249 is assigned to 'log_level_filter'
{
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:236: The value '249' provided to the cast expression is not in the valid range of values for 'eLogLevel'
^
} | ||
|
||
log_proxy_model_->setLogLevelFilter((eCAL_Logging_eLogLevel)log_level_filter); | ||
log_proxy_model_->setLogLevelFilter((eCAL::Logging::eLogLevel)log_level_filter); |
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.
warning: The value '250' provided to the cast expression is not in the valid range of values for 'eLogLevel' [clang-analyzer-optin.core.EnumCastOutOfRange]
^
Additional context
ecal/core/include/ecal/ecal_log_level.h:36: enum declared here
enum eLogLevel
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:390: Calling 'LogWidget::setLogLevelFilter'
;
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:410: Calling 'LogWidget::updateLogLevelFilter'
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Assuming the condition is true
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Taking true branch
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:233: The value 250 is assigned to 'log_level_filter'
{
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:236: The value '250' provided to the cast expression is not in the valid range of values for 'eLogLevel'
^
} | ||
|
||
log_proxy_model_->setLogLevelFilter((eCAL_Logging_eLogLevel)log_level_filter); | ||
log_proxy_model_->setLogLevelFilter((eCAL::Logging::eLogLevel)log_level_filter); |
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.
warning: The value '251' provided to the cast expression is not in the valid range of values for 'eLogLevel' [clang-analyzer-optin.core.EnumCastOutOfRange]
^
Additional context
ecal/core/include/ecal/ecal_log_level.h:36: enum declared here
enum eLogLevel
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:390: Calling 'LogWidget::setLogLevelFilter'
;
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:410: Calling 'LogWidget::updateLogLevelFilter'
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Assuming the condition is true
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Taking true branch
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:233: The value 251 is assigned to 'log_level_filter'
{
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:236: The value '251' provided to the cast expression is not in the valid range of values for 'eLogLevel'
^
} | ||
|
||
log_proxy_model_->setLogLevelFilter((eCAL_Logging_eLogLevel)log_level_filter); | ||
log_proxy_model_->setLogLevelFilter((eCAL::Logging::eLogLevel)log_level_filter); |
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.
warning: The value '252' provided to the cast expression is not in the valid range of values for 'eLogLevel' [clang-analyzer-optin.core.EnumCastOutOfRange]
^
Additional context
ecal/core/include/ecal/ecal_log_level.h:36: enum declared here
enum eLogLevel
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:390: Calling 'LogWidget::setLogLevelFilter'
;
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:410: Calling 'LogWidget::updateLogLevelFilter'
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Assuming the condition is true
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Taking true branch
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:233: The value 252 is assigned to 'log_level_filter'
{
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:236: The value '252' provided to the cast expression is not in the valid range of values for 'eLogLevel'
^
} | ||
|
||
log_proxy_model_->setLogLevelFilter((eCAL_Logging_eLogLevel)log_level_filter); | ||
log_proxy_model_->setLogLevelFilter((eCAL::Logging::eLogLevel)log_level_filter); |
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.
warning: The value '253' provided to the cast expression is not in the valid range of values for 'eLogLevel' [clang-analyzer-optin.core.EnumCastOutOfRange]
^
Additional context
ecal/core/include/ecal/ecal_log_level.h:36: enum declared here
enum eLogLevel
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:390: Calling 'LogWidget::setLogLevelFilter'
;
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:410: Calling 'LogWidget::updateLogLevelFilter'
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Assuming the condition is true
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Taking true branch
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:233: The value 253 is assigned to 'log_level_filter'
{
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:236: The value '253' provided to the cast expression is not in the valid range of values for 'eLogLevel'
^
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 made some suggestions
There were too many comments to post at once. Showing the first 20 out of 45. Check the log or trigger a new build to see more.
} | ||
|
||
log_proxy_model_->setLogLevelFilter((eCAL_Logging_eLogLevel)log_level_filter); | ||
log_proxy_model_->setLogLevelFilter((eCAL::Logging::eLogLevel)log_level_filter); |
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.
warning: The value '254' provided to the cast expression is not in the valid range of values for 'eLogLevel' [clang-analyzer-optin.core.EnumCastOutOfRange]
^
Additional context
ecal/core/include/ecal/ecal_log_level.h:36: enum declared here
enum eLogLevel
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:390: Calling 'LogWidget::setLogLevelFilter'
;
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:410: Calling 'LogWidget::updateLogLevelFilter'
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Assuming the condition is true
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Taking true branch
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:233: The value 254 is assigned to 'log_level_filter'
{
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:236: The value '254' provided to the cast expression is not in the valid range of values for 'eLogLevel'
^
} | ||
|
||
log_proxy_model_->setLogLevelFilter((eCAL_Logging_eLogLevel)log_level_filter); | ||
log_proxy_model_->setLogLevelFilter((eCAL::Logging::eLogLevel)log_level_filter); |
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.
warning: The value '3' provided to the cast expression is not in the valid range of values for 'eLogLevel' [clang-analyzer-optin.core.EnumCastOutOfRange]
^
Additional context
ecal/core/include/ecal/ecal_log_level.h:36: enum declared here
enum eLogLevel
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:390: Calling 'LogWidget::setLogLevelFilter'
;
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:410: Calling 'LogWidget::updateLogLevelFilter'
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Assuming the condition is false
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Taking false branch
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:225: The value 3 is assigned to 'log_level_filter'
{
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:236: The value '3' provided to the cast expression is not in the valid range of values for 'eLogLevel'
^
} | ||
|
||
log_proxy_model_->setLogLevelFilter((eCAL_Logging_eLogLevel)log_level_filter); | ||
log_proxy_model_->setLogLevelFilter((eCAL::Logging::eLogLevel)log_level_filter); |
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.
warning: The value '5' provided to the cast expression is not in the valid range of values for 'eLogLevel' [clang-analyzer-optin.core.EnumCastOutOfRange]
^
Additional context
ecal/core/include/ecal/ecal_log_level.h:36: enum declared here
enum eLogLevel
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:390: Calling 'LogWidget::setLogLevelFilter'
;
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:410: Calling 'LogWidget::updateLogLevelFilter'
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Assuming the condition is false
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Taking false branch
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:229: The value 5 is assigned to 'log_level_filter'
{
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:236: The value '5' provided to the cast expression is not in the valid range of values for 'eLogLevel'
^
} | ||
|
||
log_proxy_model_->setLogLevelFilter((eCAL_Logging_eLogLevel)log_level_filter); | ||
log_proxy_model_->setLogLevelFilter((eCAL::Logging::eLogLevel)log_level_filter); |
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.
warning: The value '6' provided to the cast expression is not in the valid range of values for 'eLogLevel' [clang-analyzer-optin.core.EnumCastOutOfRange]
^
Additional context
ecal/core/include/ecal/ecal_log_level.h:36: enum declared here
enum eLogLevel
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:390: Calling 'LogWidget::setLogLevelFilter'
;
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:410: Calling 'LogWidget::updateLogLevelFilter'
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Assuming the condition is false
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Taking false branch
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:229: The value 6 is assigned to 'log_level_filter'
{
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:236: The value '6' provided to the cast expression is not in the valid range of values for 'eLogLevel'
^
} | ||
|
||
log_proxy_model_->setLogLevelFilter((eCAL_Logging_eLogLevel)log_level_filter); | ||
log_proxy_model_->setLogLevelFilter((eCAL::Logging::eLogLevel)log_level_filter); |
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.
warning: The value '7' provided to the cast expression is not in the valid range of values for 'eLogLevel' [clang-analyzer-optin.core.EnumCastOutOfRange]
^
Additional context
ecal/core/include/ecal/ecal_log_level.h:36: enum declared here
enum eLogLevel
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:390: Calling 'LogWidget::setLogLevelFilter'
;
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:410: Calling 'LogWidget::updateLogLevelFilter'
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Assuming the condition is false
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:215: Taking false branch
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:219: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:223: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Assuming the condition is true
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:227: Taking true branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:229: The value 7 is assigned to 'log_level_filter'
{
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Assuming the condition is false
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:231: Taking false branch
}
^
app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp:236: The value '7' provided to the cast expression is not in the valid range of values for 'eLogLevel'
^
SeverityModel* severity_model = static_cast<SeverityModel*>(combobox->model()); | ||
combobox->setCurrentIndex(severity_model->getRow(severity)); | ||
} | ||
else if (index.column() == (int)GroupStateMinTaskStateTreeModel::Columns::SEVERITY_LEVEL) | ||
{ | ||
eCAL_Process_eSeverity_Level severity_level = (eCAL_Process_eSeverity_Level)(current_int); | ||
eCAL::Process::eSeverity_Level severity_level = (eCAL::Process::eSeverity_Level)(current_int); |
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.
warning: variable 'severity_level' of type 'eCAL::Process::eSeverity_Level' can be declared 'const' [misc-const-correctness]
eCAL::Process::eSeverity_Level severity_level = (eCAL::Process::eSeverity_Level)(current_int); | |
eCAL::Process::eSeverity_Level const severity_level = (eCAL::Process::eSeverity_Level)(current_int); |
@@ -86,13 +86,13 @@ | |||
if (index.column() == (int)GroupStateMinTaskStateTreeModel::Columns::SEVERITY) | |||
{ | |||
SeverityModel* severity_model = static_cast<SeverityModel*>(combobox->model()); | |||
eCAL_Process_eSeverity severity = severity_model->getSeverity(combobox->currentIndex()); | |||
eCAL::Process::eSeverity severity = severity_model->getSeverity(combobox->currentIndex()); |
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.
warning: variable 'severity' of type 'eCAL::Process::eSeverity' can be declared 'const' [misc-const-correctness]
eCAL::Process::eSeverity severity = severity_model->getSeverity(combobox->currentIndex()); | |
eCAL::Process::eSeverity const severity = severity_model->getSeverity(combobox->currentIndex()); |
model->setData(index, (int)severity, Qt::EditRole); | ||
} | ||
else if (index.column() == (int)GroupStateMinTaskStateTreeModel::Columns::SEVERITY_LEVEL) | ||
{ | ||
SeverityLevelModel* severity_level_model = static_cast<SeverityLevelModel*>(combobox->model()); | ||
eCAL_Process_eSeverity_Level severity_level = severity_level_model->getSeverityLevel(combobox->currentIndex()); | ||
eCAL::Process::eSeverity_Level severity_level = severity_level_model->getSeverityLevel(combobox->currentIndex()); |
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.
warning: variable 'severity_level' of type 'eCAL::Process::eSeverity_Level' can be declared 'const' [misc-const-correctness]
eCAL::Process::eSeverity_Level severity_level = severity_level_model->getSeverityLevel(combobox->currentIndex()); | |
eCAL::Process::eSeverity_Level const severity_level = severity_level_model->getSeverityLevel(combobox->currentIndex()); |
rows.push_back(std::make_pair(QString("Level 3"), eCAL_Process_eSeverity_Level::proc_sev_level3)); | ||
rows.push_back(std::make_pair(QString("Level 4"), eCAL_Process_eSeverity_Level::proc_sev_level4)); | ||
rows.push_back(std::make_pair(QString("Level 5"), eCAL_Process_eSeverity_Level::proc_sev_level5)); | ||
rows.push_back(std::make_pair(QString("Level 1"), eCAL::Process::eSeverity_Level::proc_sev_level1)); |
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.
warning: use emplace_back instead of push_back [modernize-use-emplace]
rows.push_back(std::make_pair(QString("Level 1"), eCAL::Process::eSeverity_Level::proc_sev_level1)); | |
rows.emplace_back(QString("Level 1"), eCAL::Process::eSeverity_Level::proc_sev_level1); |
rows.push_back(std::make_pair(QString("Level 4"), eCAL_Process_eSeverity_Level::proc_sev_level4)); | ||
rows.push_back(std::make_pair(QString("Level 5"), eCAL_Process_eSeverity_Level::proc_sev_level5)); | ||
rows.push_back(std::make_pair(QString("Level 1"), eCAL::Process::eSeverity_Level::proc_sev_level1)); | ||
rows.push_back(std::make_pair(QString("Level 2"), eCAL::Process::eSeverity_Level::proc_sev_level2)); |
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.
warning: use emplace_back instead of push_back [modernize-use-emplace]
rows.push_back(std::make_pair(QString("Level 2"), eCAL::Process::eSeverity_Level::proc_sev_level2)); | |
rows.emplace_back(QString("Level 2"), eCAL::Process::eSeverity_Level::proc_sev_level2); |
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 made some suggestions
There were too many comments to post at once. Showing the first 20 out of 46. Check the log or trigger a new build to see more.
std::cout << termcolor::on_magenta; | ||
break; | ||
default: | ||
break; | ||
} | ||
|
||
std::cout << "State: " << (task_state.severity == eCAL_Process_eSeverity::proc_sev_unknown ? state : state + " " + level) << std::endl; | ||
std::cout << "State: " << (task_state.severity == eCAL::Process::eSeverity::unknown ? state : state + " " + level) << std::endl; |
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.
warning: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl]
std::cout << "State: " << (task_state.severity == eCAL::Process::eSeverity::unknown ? state : state + " " + level) << std::endl; | |
std::cout << "State: " << (task_state.severity == eCAL::Process::eSeverity::unknown ? state : state + " " + level) << '\n'; |
, create_console(false) | ||
{} | ||
|
||
Task task; | ||
eCAL_Process_eStartMode window_mode; | ||
eCAL::Process::eStartMode window_mode; |
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.
warning: use default member initializer for 'window_mode' [cppcoreguidelines-use-default-member-init]
app/sys/sys_client_core/include/sys_client_core/task.h:44:
- : window_mode (eCAL::Process::eStartMode::normal)
+ :
eCAL::Process::eStartMode window_mode; | |
eCAL::Process::eStartMode window_mode{eCAL::Process::eStartMode::normal}; |
SeverityModel* severity_model = static_cast<SeverityModel*>(combobox->model()); | ||
combobox->setCurrentIndex(severity_model->getRow(severity)); | ||
} | ||
else if (index.column() == (int)GroupStateMinTaskStateTreeModel::Columns::SEVERITY_LEVEL) | ||
{ | ||
eCAL_Process_eSeverity_Level severity_level = (eCAL_Process_eSeverity_Level)(current_int); | ||
eCAL::Process::eSeverityLevel severity_level = (eCAL::Process::eSeverityLevel)(current_int); |
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.
warning: variable 'severity_level' of type 'eCAL::Process::eSeverityLevel' can be declared 'const' [misc-const-correctness]
eCAL::Process::eSeverityLevel severity_level = (eCAL::Process::eSeverityLevel)(current_int); | |
eCAL::Process::eSeverityLevel const severity_level = (eCAL::Process::eSeverityLevel)(current_int); |
model->setData(index, (int)severity, Qt::EditRole); | ||
} | ||
else if (index.column() == (int)GroupStateMinTaskStateTreeModel::Columns::SEVERITY_LEVEL) | ||
{ | ||
SeverityLevelModel* severity_level_model = static_cast<SeverityLevelModel*>(combobox->model()); | ||
eCAL_Process_eSeverity_Level severity_level = severity_level_model->getSeverityLevel(combobox->currentIndex()); | ||
eCAL::Process::eSeverityLevel severity_level = severity_level_model->getSeverityLevel(combobox->currentIndex()); |
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.
warning: variable 'severity_level' of type 'eCAL::Process::eSeverityLevel' can be declared 'const' [misc-const-correctness]
eCAL::Process::eSeverityLevel severity_level = severity_level_model->getSeverityLevel(combobox->currentIndex()); | |
eCAL::Process::eSeverityLevel const severity_level = severity_level_model->getSeverityLevel(combobox->currentIndex()); |
rows.push_back(std::make_pair(QString("Level 3"), eCAL_Process_eSeverity_Level::proc_sev_level3)); | ||
rows.push_back(std::make_pair(QString("Level 4"), eCAL_Process_eSeverity_Level::proc_sev_level4)); | ||
rows.push_back(std::make_pair(QString("Level 5"), eCAL_Process_eSeverity_Level::proc_sev_level5)); | ||
rows.push_back(std::make_pair(QString("Level 1"), eCAL::Process::eSeverityLevel::level1)); |
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.
warning: use emplace_back instead of push_back [modernize-use-emplace]
rows.push_back(std::make_pair(QString("Level 1"), eCAL::Process::eSeverityLevel::level1)); | |
rows.emplace_back(QString("Level 1"), eCAL::Process::eSeverityLevel::level1); |
@@ -2302,7 +2302,7 @@ | |||
auto selected_tasks = getSelectedTasks(); | |||
if (selected_tasks.size() != 0) | |||
{ | |||
eCAL_Process_eSeverity_Level selected_severity_level = severity_level_model_->getSeverityLevel(index); | |||
eCAL::Process::eSeverityLevel selected_severity_level = severity_level_model_->getSeverityLevel(index); |
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.
warning: variable 'selected_severity_level' of type 'eCAL::Process::eSeverityLevel' can be declared 'const' [misc-const-correctness]
eCAL::Process::eSeverityLevel selected_severity_level = severity_level_model_->getSeverityLevel(index); | |
!= 0)const |
/** | ||
* @brief eCAL subscriber event callback type. | ||
**/ | ||
enum class eSubscriberEvent |
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.
warning: enum 'eSubscriberEvent' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]
^
/** | ||
* @brief eCAL publisher event callback type. | ||
**/ | ||
enum class ePublisherEvent |
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.
warning: enum 'ePublisherEvent' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]
^
/** | ||
* @brief eCAL service client event callback type. | ||
**/ | ||
enum class eClientEvent |
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.
warning: enum 'eClientEvent' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]
^
/** | ||
* @brief eCAL service server event callback type. | ||
**/ | ||
enum class eServerEvent |
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.
warning: enum 'eServerEvent' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]
^
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 made some suggestions
There were too many comments to post at once. Showing the first 20 out of 26. Check the log or trigger a new build to see more.
* @brief Values that represent different log level to filter on monitoring. | ||
**/ | ||
enum eCAL_Logging_eLogLevel | ||
namespace eCAL |
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.
warning: expected ';' after top level declarator [clang-diagnostic-error]
namespace eCAL | |
namespace eCAL; |
* @brief Values that represent different log level to filter on monitoring. | ||
**/ | ||
enum eCAL_Logging_eLogLevel | ||
namespace eCAL |
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.
warning: unknown type name 'namespace' [clang-diagnostic-error]
namespace eCAL
^
**/ | ||
// We're currently not making this an enum class, because this will not allow the bitmasking anymore. | ||
// Need to come up with a different solution in that case. | ||
enum eLogLevel |
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.
warning: enum 'eLogLevel' uses a larger base type ('unsigned int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]
enum eLogLevel
^
|
||
typedef unsigned char eCAL_Logging_Filter; //!< This type is to be used as a bitmask for the activated logging levels | ||
typedef unsigned char Filter; //!< This type is to be used as a bitmask for the activated logging levels |
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.
warning: use 'using' instead of 'typedef' [modernize-use-using]
typedef unsigned char Filter; //!< This type is to be used as a bitmask for the activated logging levels | |
using Filter = unsigned char; //!< This type is to be used as a bitmask for the activated logging levels |
}; | ||
namespace Process | ||
{ | ||
enum class eStartMode |
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.
warning: enum 'eStartMode' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]
enum class eStartMode
^
@@ -43,7 +43,7 @@ int main() | |||
eCAL::Process::SleepMS(2000); | |||
|
|||
// start process | |||
int pid = eCAL::Process::StartProcess(proc_name, "", "", false, proc_smode_normal, false); | |||
int pid = eCAL::Process::StartProcess(proc_name, "", "", false, eCAL::Process::eStartMode::normal, false); |
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.
warning: variable 'pid' of type 'int' can be declared 'const' [misc-const-correctness]
int pid = eCAL::Process::StartProcess(proc_name, "", "", false, eCAL::Process::eStartMode::normal, false); | |
int const pid = eCAL::Process::StartProcess(proc_name, "", "", false, eCAL::Process::eStartMode::normal, false); |
@@ -138,7 +190,7 @@ int ecal_set_unit_name(const char* unit_name_) | |||
/****************************************/ | |||
void ecal_set_process_state(const int severity_, const int level_, const char* info_) | |||
{ | |||
return(eCAL::Process::SetState(eCAL_Process_eSeverity(severity_), eCAL_Process_eSeverity_Level(level_), info_)); | |||
return(eCAL::Process::SetState(eCAL::Process::eSeverity(severity_), eCAL::Process::eSeverityLevel(level_), info_)); |
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.
warning: return statement within a void function should not have a specified return value [readability-avoid-return-with-void-value]
return(eCAL::Process::SetState(eCAL::Process::eSeverity(severity_), eCAL::Process::eSeverityLevel(level_), info_));
^
case sub_event_connected: | ||
std::cout << "event : " << "sub_event_connected" << std::endl; | ||
case eCAL::eSubscriberEvent::connected: | ||
std::cout << "event : " << "connected" << std::endl; |
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.
warning: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl]
std::cout << "event : " << "connected" << std::endl; | |
std::cout << "event : " << "connected" << '\n'; |
case sub_event_disconnected: | ||
std::cout << "event : " << "sub_event_disconnected" << std::endl; | ||
case eCAL::eSubscriberEvent::disconnected: | ||
std::cout << "event : " << "disconnected" << std::endl; |
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.
warning: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl]
std::cout << "event : " << "disconnected" << std::endl; | |
std::cout << "event : " << "disconnected" << '\n'; |
case sub_event_dropped: | ||
std::cout << "event : " << "sub_event_dropped (" << data_->clock << " messages)" << std::endl; | ||
case eCAL::eSubscriberEvent::dropped: | ||
std::cout << "event : " << "dropped (" << data_->clock << " messages)" << std::endl; |
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.
warning: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl]
std::cout << "event : " << "dropped (" << data_->clock << " messages)" << std::endl; | |
std::cout << "event : " << "dropped (" << data_->clock << " messages)" << '\n'; |
In core, events are now enum class instead of enum.
Description
This PR splits C and C++ ecal files into 2 different folders and completely moves the C files to
lang/c
, thus C is now handled as a proper language bindings.The two implementation do no longer share any header files.