From ef1b562714935525b972cf7cc84122909ea46257 Mon Sep 17 00:00:00 2001 From: Juho Hiltunen Date: Sun, 23 Oct 2022 11:49:02 +0300 Subject: [PATCH] cleanup: remove code duplication by using SetPlist2() --- src/libespeak-ng/translate.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/libespeak-ng/translate.c b/src/libespeak-ng/translate.c index 5fe64005..999a5874 100644 --- a/src/libespeak-ng/translate.c +++ b/src/libespeak-ng/translate.c @@ -349,12 +349,8 @@ static int TranslateWord2(Translator *tr, char *word, WORD_TAB *wtab, int pre_pa if ((word[0] == 0) || (word_flags & FLAG_DELETE_WORD)) { // nothing to translate. Add a dummy phoneme to carry any embedded commands if (embedded_flag) { - ph_list2[n_ph_list2].phcode = phonEND_WORD; - ph_list2[n_ph_list2].stresslevel = 0; + SetPlist2(&ph_list2[n_ph_list2], phonEND_WORD); ph_list2[n_ph_list2].wordstress = 0; - ph_list2[n_ph_list2].tone_ph = 0; - ph_list2[n_ph_list2].synthflags = embedded_flag; - ph_list2[n_ph_list2].sourceix = 0; n_ph_list2++; embedded_flag = 0; }