Skip to content

Commit

Permalink
Constness of relatedChannelFormats/relatedPackFormats
Browse files Browse the repository at this point in the history
  • Loading branch information
firthm01 committed Feb 12, 2024
1 parent 218a812 commit 5651c47
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ class ValueBoxMain : public Component {
auto pfDatas = tdData->relatedPackFormats;
std::stable_sort(
pfDatas.begin(), pfDatas.end(),
[](const std::shared_ptr<AdmPresetDefinitionsHelper::PackFormatData>& a,
const std::shared_ptr<AdmPresetDefinitionsHelper::PackFormatData>& b) {
[](const std::shared_ptr<AdmPresetDefinitionsHelper::PackFormatData const>& a,
const std::shared_ptr<AdmPresetDefinitionsHelper::PackFormatData const>& b) {
if (a->isCommonDefinition() != b->isCommonDefinition()) {
return a->isCommonDefinition() > b->isCommonDefinition();
}
Expand Down
2 changes: 1 addition & 1 deletion shared/helper/adm_preset_definitions_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ const bool AdmPresetDefinitionsHelper::ChannelFormatData::isCommonDefinition() c
return AdmPresetDefinitionsHelper::isCommonDefinition(idValue);
}

const std::string AdmPresetDefinitionsHelper::ChannelFormatData::getBestSpeakerLabel()
const std::string AdmPresetDefinitionsHelper::ChannelFormatData::getBestSpeakerLabel() const
{
if (legacySpeakerLabel.has_value())
return legacySpeakerLabel.value();
Expand Down
6 changes: 3 additions & 3 deletions shared/helper/adm_preset_definitions_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class AdmPresetDefinitionsHelper {
float distance{ 1.f };

const bool isCommonDefinition() const;
const std::string getBestSpeakerLabel();
const std::string getBestSpeakerLabel() const;

private:
void setItuLabels();
Expand All @@ -59,7 +59,7 @@ class AdmPresetDefinitionsHelper {
std::optional<std::string> ituLabel;
std::optional<std::string> ituStandard;
std::shared_ptr<adm::AudioPackFormat> packFormat;
std::vector<std::shared_ptr<ChannelFormatData>> relatedChannelFormats;
std::vector<std::shared_ptr<ChannelFormatData const>> relatedChannelFormats;

const bool isCommonDefinition() const;

Expand All @@ -71,7 +71,7 @@ class AdmPresetDefinitionsHelper {
int id{ 0 };
adm::TypeDescriptor typeDescriptor;
std::string name;
std::vector<std::shared_ptr<PackFormatData>> relatedPackFormats;
std::vector<std::shared_ptr<PackFormatData const>> relatedPackFormats;
};

struct ChannelTrackAssociation {
Expand Down

0 comments on commit 5651c47

Please sign in to comment.