Browse Source

cleanup: change int skip to bool

master
Juho Hiltunen 2 years ago
parent
commit
14f12376a3
1 changed files with 4 additions and 5 deletions
  1. 4
    5
      src/libespeak-ng/voices.c

+ 4
- 5
src/libespeak-ng/voices.c View File

int n_variants; int n_variants;
int variant_number; int variant_number;
int gender; int gender;
int skip;
int aged = 1; int aged = 1;
char *variant_name; char *variant_name;
const char *p, *p_start; const char *p, *p_start;
for (ix = 0, ix2 = 0; ix < nv; ix++) { for (ix = 0, ix2 = 0; ix < nv; ix++) {
vp = voices[ix]; vp = voices[ix];
// is the main voice the required gender? // is the main voice the required gender?
skip = 0;
bool skip = false;


if ((gender != ENGENDER_UNKNOWN) && (vp->gender != gender)) if ((gender != ENGENDER_UNKNOWN) && (vp->gender != gender))
skip = 1;
skip = true;
if ((ix2 == 0) && aged && (vp->age < AGE_OLD)) if ((ix2 == 0) && aged && (vp->age < AGE_OLD))
skip = 1;
skip = true;


if (skip == 0)
if (skip == false)
voices2[ix2++] = vp; voices2[ix2++] = vp;


for (j = 0; (j < vp->xx1) && (n_variants < N_VOICE_VARIANTS);) { for (j = 0; (j < vp->xx1) && (n_variants < N_VOICE_VARIANTS);) {

Loading…
Cancel
Save