Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[play] Separate Encoding and Type in Player application. #1836

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

KerstinKeller
Copy link
Contributor

Relevant for #1832.

@KerstinKeller KerstinKeller added the cherry-pick-to-NONE Don't cherry-pick these changes label Dec 4, 2024
Copy link
Contributor

@github-actions github-actions bot left a 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_);
Copy link
Contributor

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]

Suggested change
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,
Copy link
Contributor

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,
Copy link
Contributor

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);
Copy link
Contributor

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]

Suggested change
std::string channel_encoding = QEcalPlay::instance()->channelEncoding(name);
std::string const channel_encoding = QEcalPlay::instance()->channelEncoding(name);

Copy link
Contributor

@Peguen Peguen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@KerstinKeller KerstinKeller mentioned this pull request Dec 4, 2024
82 tasks
@KerstinKeller KerstinKeller merged commit b6b66b2 into master Dec 5, 2024
21 of 22 checks passed
@KerstinKeller KerstinKeller deleted the feature/ecal-play-separate-topic-encoding branch December 6, 2024 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-to-NONE Don't cherry-pick these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants