Merge branch 'tizen_8.0' into tizen 86/306286/1 accepted/tizen_unified_toolchain accepted/tizen/unified/20240221.062918 accepted/tizen/unified/toolchain/20240311.065803 accepted/tizen/unified/x/20240222.211040
authorJi-hoon Lee <dalton.lee@samsung.com>
Mon, 19 Feb 2024 12:21:04 +0000 (21:21 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Mon, 19 Feb 2024 12:21:04 +0000 (21:21 +0900)
Change-Id: I9c3fdce18b604c780e3561c4b6815627e360773d

src/service_config.cpp

index cda77e5..cfcfeb1 100644 (file)
@@ -328,9 +328,6 @@ int CServiceConfig::load_custom_wake_words(const char* app_id,
 {
        const char delimeter = '|';
 
-       wakeup_word_storage.clear();
-       wakeup_language_storage.clear();
-
        /* Add 1 for additional pipe character */
        char wakeup_words[MAX_WAKEUP_WORDS_NUM * (MAX_WAKEUP_WORD_LEN + 1)];
        char wakeup_languages[MAX_WAKEUP_WORDS_NUM * (MAX_SUPPORTED_LANGUAGE_LEN + 1)];
@@ -426,11 +423,11 @@ int CServiceConfig::get_custom_wake_word_num(
        std::vector<std::string> &wakeup_word_storage,
        std::vector<std::string> &wakeup_language_storage)
 {
-       size_t max_size = MAX_WAKEUP_WORDS_NUM;
-       if (max_size > wakeup_word_storage.size()) max_size = wakeup_word_storage.size();
-       if (max_size > wakeup_language_storage.size()) max_size = wakeup_language_storage.size();
+       size_t words_num = MAX_WAKEUP_WORDS_NUM;
+       if (words_num > wakeup_word_storage.size()) words_num = wakeup_word_storage.size();
+       if (words_num > wakeup_language_storage.size()) words_num = wakeup_language_storage.size();
 
-       return max_size;
+       return words_num;
 }
 
 bool CServiceConfig::has_custom_wake_word(const char* wake_word, const char* language,