Use in-class initializer for class members
[platform/core/api/audio-io.git] / src / cpp / CPulseStreamSpec.cpp
index d1a5e8b..0d295b9 100644 (file)
@@ -42,18 +42,9 @@ static const char* STREAM_LATENCY_VOIP    = "voip";
 static const char* STREAM_LATENCY_DEFAULT = "default";
 static const char* STREAM_LATENCY_DEFAULT_ASYNC = "default-async";
 
-//LCOV_EXCL_START
-CPulseStreamSpec::CPulseStreamSpec():
-    __mLatency(EStreamLatency::STREAM_LATENCY_INPUT_DEFAULT),
-    __mStreamName(nullptr) {
-    __adjustSpec();
-}
-//LCOV_EXCL_STOP
-
 CPulseStreamSpec::CPulseStreamSpec(EStreamLatency latency, CAudioInfo& audioInfo) :
     __mLatency(latency),
-    __mAudioInfo(audioInfo),
-    __mStreamName(nullptr) {
+    __mAudioInfo(audioInfo) {
     __adjustSpec();
 }
 
@@ -152,11 +143,11 @@ void CPulseStreamSpec::__adjustSpec() noexcept {
 //LCOV_EXCL_STOP
 }
 
-CPulseStreamSpec::EStreamLatency CPulseStreamSpec::getStreamLatency() noexcept {
+CPulseStreamSpec::EStreamLatency CPulseStreamSpec::getStreamLatency() const noexcept {
     return __mLatency;
 }
 
-const char* CPulseStreamSpec::getStreamLatencyToString() noexcept {
+const char* CPulseStreamSpec::getStreamLatencyToString() const noexcept {
     const char* latency;
 
     switch (__mLatency) {
@@ -206,14 +197,14 @@ CAudioInfo& CPulseStreamSpec::getAudioInfo() noexcept {
     return __mAudioInfo;
 }
 
-pa_sample_spec CPulseStreamSpec::getSampleSpec() noexcept {
+pa_sample_spec CPulseStreamSpec::getSampleSpec() const noexcept {
     return __mSampleSpec;
 }
 
-pa_channel_map CPulseStreamSpec::getChannelMap() noexcept {
+pa_channel_map CPulseStreamSpec::getChannelMap() const noexcept {
     return __mChannelMap;
 }
 
-const char* CPulseStreamSpec::getStreamName() noexcept {
+const char* CPulseStreamSpec::getStreamName() const noexcept {
     return __mStreamName;
 }