-
Notifications
You must be signed in to change notification settings - Fork 178
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
[play] Separate Encoding and Type in Player application. #1836
[play] Separate Encoding and Type in Player application. #1836
Conversation
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
@@ -763,6 +763,19 @@ std::string PlayThread::GetChannelType(const std::string& channel_name) | |||
} | |||
} | |||
|
|||
std::string PlayThread::GetChannelEncoding(const std::string& channel_name) | |||
{ | |||
std::shared_lock<std::shared_timed_mutex> measurement_lock(measurement_mutex_); |
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 'measurement_lock' of type 'std::shared_lockstd::shared_timed_mutex' can be declared 'const' [misc-const-correctness]
std::shared_lock<std::shared_timed_mutex> measurement_lock(measurement_mutex_); | |
std::shared_lock<std::shared_timed_mutex> const measurement_lock(measurement_mutex_); |
@@ -40,12 +40,13 @@ ChannelTreeItem::ChannelTreeItem(const QString& source_name) | |||
, duration_(0) | |||
{} | |||
|
|||
ChannelTreeItem::ChannelTreeItem(const QString& source_name, const QString& channel_type, size_t total_channel_size, | |||
ChannelTreeItem::ChannelTreeItem(const QString& source_name, const QString& channel_encoding, const QString& channel_type, size_t total_channel_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.
warning: no header providing "size_t" is directly included [misc-include-cleaner]
app/play/play_gui/src/widgets/models/channel_tree_item.cpp:18:
- #include <math.h>
+ #include <cstddef>
+ #include <math.h>
@@ -47,7 +48,7 @@ class ChannelTreeItem : public QAbstractTreeItem | |||
}; | |||
|
|||
ChannelTreeItem(const QString& source_name); | |||
ChannelTreeItem(const QString& source_name, const QString& channel_type, size_t total_channel_size, | |||
ChannelTreeItem(const QString& source_name, const QString& channel_encoding, const QString& channel_type, size_t total_channel_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.
warning: no header providing "size_t" is directly included [misc-include-cleaner]
app/play/play_gui/src/widgets/models/channel_tree_item.h:22:
+ #include <cstddef>
@@ -237,9 +237,10 @@ void ChannelTreeModel::reload() | |||
double minTimestamp = QEcalPlay::instance()->minTimestampOfChannel(name); | |||
double maxTimestamp = QEcalPlay::instance()->maxTimestampOfChannel(name); | |||
std::string channel_type = QEcalPlay::instance()->channelType(name); | |||
std::string channel_encoding = QEcalPlay::instance()->channelEncoding(name); |
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 'channel_encoding' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness]
std::string channel_encoding = QEcalPlay::instance()->channelEncoding(name); | |
std::string const channel_encoding = QEcalPlay::instance()->channelEncoding(name); |
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.
👍
Relevant for #1832.