diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-02-14 18:49:04 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2014-02-14 18:49:04 +0100 |
commit | c1da0ac7cca49e0b96dbb359ee48000cb04df15b (patch) | |
tree | c6041007cfa28ea80e5dc5df2f1944faf714ab32 /src/MuxElements.cpp | |
parent | d6d8d67b1c921d8fca7257291c15c07bdea8d14a (diff) | |
download | dabmux-c1da0ac7cca49e0b96dbb359ee48000cb04df15b.tar.gz dabmux-c1da0ac7cca49e0b96dbb359ee48000cb04df15b.tar.bz2 dabmux-c1da0ac7cca49e0b96dbb359ee48000cb04df15b.zip |
improve RC constness
Diffstat (limited to 'src/MuxElements.cpp')
-rw-r--r-- | src/MuxElements.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/MuxElements.cpp b/src/MuxElements.cpp index 1e3f5b2..11eb4bf 100644 --- a/src/MuxElements.cpp +++ b/src/MuxElements.cpp @@ -218,7 +218,8 @@ bool DabComponent::isPacketComponent(vector<dabSubchannel*>& subchannels) return true; } -void DabComponent::set_parameter(string parameter, string value) +void DabComponent::set_parameter(const string& parameter, + const string& value) { stringstream ss(value); ss.exceptions ( stringstream::failbit | stringstream::badbit ); @@ -266,7 +267,7 @@ void DabComponent::set_parameter(string parameter, string value) } } -string DabComponent::get_parameter(string parameter) +const string DabComponent::get_parameter(const string& parameter) const { stringstream ss; if (parameter == "label") { @@ -315,7 +316,8 @@ unsigned char DabService::nbComponent(vector<DabComponent*>& components) return nb; } -void DabService::set_parameter(string parameter, string value) +void DabService::set_parameter(const string& parameter, + const string& value) { stringstream ss(value); ss.exceptions ( stringstream::failbit | stringstream::badbit ); @@ -363,7 +365,7 @@ void DabService::set_parameter(string parameter, string value) } } -string DabService::get_parameter(string parameter) +const string DabService::get_parameter(const string& parameter) const { stringstream ss; if (parameter == "label") { |