Fix to access list in ttsd_data 82/117182/1
authorsooyeon.kim <sooyeon.kim@samsung.com>
Fri, 3 Mar 2017 06:31:57 +0000 (15:31 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Fri, 3 Mar 2017 06:32:34 +0000 (15:32 +0900)
Change-Id: I99fc2eba2db284d7887760dd3fac1c9405fb9ebc
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
server/ttsd_data.cpp

index b523144..9432adc 100644 (file)
@@ -72,7 +72,7 @@ int __data_show_sound_list(int index)
 
        unsigned int i = 0;
        std::list<sound_data_s*>::iterator iter;
-       for (iter = g_app_list[index].m_wav_data.begin(); iter != g_app_list[index].m_wav_data.end(); iter++) {
+       for (iter = g_app_list[index].m_wav_data.begin(); iter != g_app_list[index].m_wav_data.end(); ++iter) {
                SLOG(LOG_DEBUG, tts_tag(), "[%dth][%p] data(%p) data size(%ld), uttid(%d), type(%d)", 
                        i, *iter, (*iter)->data, (*iter)->data_size, (*iter)->utt_id, (*iter)->audio_type);
                i++;
@@ -92,7 +92,7 @@ int __data_show_text_list(int index)
 
        unsigned int i = 0;
        std::list<speak_data_s*>::iterator iter;
-       for (iter = g_app_list[index].m_speak_data.begin(); iter != g_app_list[index].m_speak_data.end(); iter++) {
+       for (iter = g_app_list[index].m_speak_data.begin(); iter != g_app_list[index].m_speak_data.end(); ++iter) {
                SLOG(LOG_DEBUG, tts_tag(), "[%dth][%p] lang(%s), vctype(%d), speed(%d), uttid(%d), text(%s)", 
                        i + 1, *iter, (*iter)->lang, (*iter)->vctype, (*iter)->speed, (*iter)->utt_id, (*iter)->text);
                i++;
@@ -112,7 +112,7 @@ int __data_show_used_voice_list(int index)
 
        unsigned int i = 0;
        std::list<used_voice_s>::iterator iter;
-       for (iter = g_app_list[index].m_used_voice.begin(); iter != g_app_list[index].m_used_voice.end(); iter++) {
+       for (iter = g_app_list[index].m_used_voice.begin(); iter != g_app_list[index].m_used_voice.end(); ++iter) {
                SLOG(LOG_DEBUG, tts_tag(), "[%dth] lang(%s), vctype(%d)", i + 1, iter->lang, iter->vctype);
                i++;
        }
@@ -239,7 +239,7 @@ int ttsd_data_set_used_voice(int uid, const char* lang, int type)
        /* Find voice */
        std::list<used_voice_s>::iterator iter;
 
-       for (iter = g_app_list[index].m_used_voice.begin();iter != g_app_list[index].m_used_voice.end();iter++) {
+       for (iter = g_app_list[index].m_used_voice.begin(); iter != g_app_list[index].m_used_voice.end();++iter) {
                if (0 == strcmp(lang, iter->lang) && type == iter->vctype) {
                        SLOG(LOG_DEBUG, tts_tag(), "[DATA] The voice is already registered (%s)(%d)", lang, type);
                        return 0;
@@ -277,7 +277,7 @@ int ttsd_data_reset_used_voice(int uid, ttsd_used_voice_cb callback)
        /* Find voice */
        std::list<used_voice_s>::iterator iter;
 
-       for (iter = g_app_list[index].m_used_voice.begin(); iter != g_app_list[index].m_used_voice.end(); iter++) {
+       for (iter = g_app_list[index].m_used_voice.begin(); iter != g_app_list[index].m_used_voice.end(); ++iter) {
                if (NULL != callback) {
                        callback(iter->lang, iter->vctype);
                }
@@ -689,7 +689,7 @@ int ttsd_data_save_error_log(int uid, FILE* fp)
 
        i = 0;
        std::list<sound_data_s*>::iterator iter;
-       for (iter = g_app_list[index].m_wav_data.begin(); iter != g_app_list[index].m_wav_data.end(); iter++) {
+       for (iter = g_app_list[index].m_wav_data.begin(); iter != g_app_list[index].m_wav_data.end(); ++iter) {
                SLOG(LOG_DEBUG, tts_tag(), "[%dth][%p] data(%p) data size(%ld), uttid(%d), type(%d)",
                        i, *iter, (*iter)->data, (*iter)->data_size, (*iter)->utt_id, (*iter)->audio_type);
                i++;
@@ -702,7 +702,7 @@ int ttsd_data_save_error_log(int uid, FILE* fp)
 
        i = 0;
        std::list<speak_data_s*>::iterator iter_speak;
-       for (iter_speak = g_app_list[index].m_speak_data.begin(); iter_speak != g_app_list[index].m_speak_data.end(); iter_speak++) {
+       for (iter_speak = g_app_list[index].m_speak_data.begin(); iter_speak != g_app_list[index].m_speak_data.end(); ++iter_speak) {
                SLOG(LOG_DEBUG, tts_tag(), "[%dth][%p] lang(%s), vctype(%d), speed(%d), uttid(%d), text(%s)",
                        i, *iter_speak, (*iter_speak)->lang, (*iter_speak)->vctype, (*iter_speak)->speed, (*iter_speak)->utt_id, (*iter_speak)->text);
                i++;