use auto for constexpr whenever possible
[platform/core/api/audio-io.git] / src / cpp / cpp_audio_io.cpp
index 223eed7..283cb84 100644 (file)
@@ -277,8 +277,8 @@ static audio_io_state_e __convert_state_type(const CAudioInfo::EAudioIOState src
 }
 
 static void __check_audio_param(int sample_rate, audio_channel_e channel, audio_sample_type_e type, bool is_output) {
-    if (sample_rate < static_cast<int>(CAudioInfo::MIN_SYSTEM_SAMPLERATE) ||
-        sample_rate > static_cast<int>(CAudioInfo::MAX_SYSTEM_SAMPLERATE))
+    if (sample_rate < CAudioInfo::MIN_SYSTEM_SAMPLERATE ||
+        sample_rate > CAudioInfo::MAX_SYSTEM_SAMPLERATE)
         THROW_ERROR_MSG_FORMAT(CAudioError::EError::ERROR_INVALID_ARGUMENT, "Invalid sample rate :%d", sample_rate);
 
     if (channel < AUDIO_CHANNEL_MONO ||