summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-09-25 22:12:18 +0200
committerCarl Hetherington <cth@carlh.net>2025-09-25 22:12:18 +0200
commit6698e6e33ba41a6d0ad30b02f9fb5ef18d788ad6 (patch)
tree4e37f1db23ba716e8620bc8851a0d50959bd11a1 /src
parent763b6b6b73eda3d014c77417e3cb873d592daed2 (diff)
White space: main_sound_configuration.{cc,h}
Diffstat (limited to 'src')
-rw-r--r--src/main_sound_configuration.cc36
-rw-r--r--src/main_sound_configuration.h18
2 files changed, 27 insertions, 27 deletions
diff --git a/src/main_sound_configuration.cc b/src/main_sound_configuration.cc
index a48ff88d..c22da40b 100644
--- a/src/main_sound_configuration.cc
+++ b/src/main_sound_configuration.cc
@@ -46,11 +46,11 @@ using namespace dcp;
-MainSoundConfiguration::MainSoundConfiguration (string s)
+MainSoundConfiguration::MainSoundConfiguration(string s)
: _configuration(s)
{
vector<string> parts;
- boost::split (parts, s, boost::is_any_of("/"));
+ boost::split(parts, s, boost::is_any_of("/"));
if (parts.empty()) {
_valid = false;
return;
@@ -72,7 +72,7 @@ MainSoundConfiguration::MainSoundConfiguration (string s)
}
vector<string> channels;
- boost::split (channels, parts[1], boost::is_any_of(","));
+ boost::split(channels, parts[1], boost::is_any_of(","));
if (channels.size() > 16) {
_valid = false;
@@ -93,10 +93,10 @@ MainSoundConfiguration::MainSoundConfiguration (string s)
}
-MainSoundConfiguration::MainSoundConfiguration (MCASoundField field, int channels)
- : _field (field)
+MainSoundConfiguration::MainSoundConfiguration(MCASoundField field, int channels)
+ : _field(field)
{
- _channels.resize (channels);
+ _channels.resize(channels);
update_string();
}
@@ -134,21 +134,21 @@ MainSoundConfiguration::update_string()
optional<Channel>
-MainSoundConfiguration::mapping (int index) const
+MainSoundConfiguration::mapping(int index) const
{
throw_if_invalid();
- DCP_ASSERT (static_cast<size_t>(index) < _channels.size());
+ DCP_ASSERT(static_cast<size_t>(index) < _channels.size());
return _channels[index];
}
void
-MainSoundConfiguration::set_mapping (int index, Channel c)
+MainSoundConfiguration::set_mapping(int index, Channel c)
{
throw_if_invalid();
- DCP_ASSERT (static_cast<size_t>(index) < _channels.size());
+ DCP_ASSERT(static_cast<size_t>(index) < _channels.size());
_channels[index] = c;
update_string();
@@ -156,7 +156,7 @@ MainSoundConfiguration::set_mapping (int index, Channel c)
Channel
-dcp::mca_id_to_channel (string id)
+dcp::mca_id_to_channel(string id)
{
transform(id.begin(), id.end(), id.begin(), ::tolower);
@@ -192,12 +192,12 @@ dcp::mca_id_to_channel (string id)
return Channel::SIGN_LANGUAGE;
}
- throw UnknownChannelIdError (id);
+ throw UnknownChannelIdError(id);
}
string
-dcp::channel_to_mca_id (Channel c, MCASoundField field)
+dcp::channel_to_mca_id(Channel c, MCASoundField field)
{
switch (c) {
case Channel::LEFT:
@@ -230,12 +230,12 @@ dcp::channel_to_mca_id (Channel c, MCASoundField field)
break;
}
- DCP_ASSERT (false);
+ DCP_ASSERT(false);
}
string
-dcp::channel_to_mca_name (Channel c, MCASoundField field)
+dcp::channel_to_mca_name(Channel c, MCASoundField field)
{
switch (c) {
case Channel::LEFT:
@@ -268,12 +268,12 @@ dcp::channel_to_mca_name (Channel c, MCASoundField field)
break;
}
- DCP_ASSERT (false);
+ DCP_ASSERT(false);
}
ASDCP::UL
-dcp::channel_to_mca_universal_label (Channel c, MCASoundField field, ASDCP::Dictionary const* dict)
+dcp::channel_to_mca_universal_label(Channel c, MCASoundField field, ASDCP::Dictionary const* dict)
{
static byte_t sync_signal[] = {
0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0d, 0x03, 0x02, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00
@@ -314,7 +314,7 @@ dcp::channel_to_mca_universal_label (Channel c, MCASoundField field, ASDCP::Dict
break;
}
- DCP_ASSERT (false);
+ DCP_ASSERT(false);
}
diff --git a/src/main_sound_configuration.h b/src/main_sound_configuration.h
index b1fb9b77..2c872ba2 100644
--- a/src/main_sound_configuration.h
+++ b/src/main_sound_configuration.h
@@ -52,10 +52,10 @@ enum class MCASoundField
};
-extern std::string channel_to_mca_id (Channel c, MCASoundField field);
-extern Channel mca_id_to_channel (std::string);
-extern std::string channel_to_mca_name (Channel c, MCASoundField field);
-extern ASDCP::UL channel_to_mca_universal_label (Channel c, MCASoundField field, ASDCP::Dictionary const* dict);
+extern std::string channel_to_mca_id(Channel c, MCASoundField field);
+extern Channel mca_id_to_channel(std::string);
+extern std::string channel_to_mca_name(Channel c, MCASoundField field);
+extern ASDCP::UL channel_to_mca_universal_label(Channel c, MCASoundField field, ASDCP::Dictionary const* dict);
@@ -69,20 +69,20 @@ public:
* return the original invalid string.
*/
explicit MainSoundConfiguration(std::string);
- MainSoundConfiguration (MCASoundField field_, int channels);
+ MainSoundConfiguration(MCASoundField field_, int channels);
- MCASoundField field () const {
+ MCASoundField field() const {
throw_if_invalid();
return _field;
}
- int channels () const {
+ int channels() const {
throw_if_invalid();
return _channels.size();
}
- boost::optional<Channel> mapping (int index) const;
- void set_mapping (int index, Channel channel);
+ boost::optional<Channel> mapping(int index) const;
+ void set_mapping(int index, Channel channel);
std::string as_string() const {
return _configuration;