Cleanup: use STREQ macro

This commit is contained in:
Campbell Barton 2022-10-29 12:05:16 +11:00
parent f9113b7eb6
commit 2c9fe719e6
2 changed files with 4 additions and 4 deletions

View File

@ -492,7 +492,7 @@ static const AVCodec *get_av1_encoder(
/* Apply AV1 encoder specific settings. */
if (codec) {
if (strcmp(codec->name, "librav1e") == 0) {
if (STREQ(codec->name, "librav1e")) {
/* Set "tiles" to 8 to enable multi-threaded encoding. */
if (rd->threads > 8) {
ffmpeg_dict_set_int(opts, "tiles", rd->threads);
@ -530,7 +530,7 @@ static const AVCodec *get_av1_encoder(
BLI_snprintf(buffer, sizeof(buffer), "keyint=%d", context->ffmpeg_gop_size);
av_dict_set(opts, "rav1e-params", buffer, 0);
}
else if (strcmp(codec->name, "libsvtav1") == 0) {
else if (STREQ(codec->name, "libsvtav1")) {
/* Set preset value based on ffmpeg_preset.
* Must check context->ffmpeg_preset again in case this encoder was selected due to the
* absence of another. */
@ -552,7 +552,7 @@ static const AVCodec *get_av1_encoder(
ffmpeg_dict_set_int(opts, "qp", context->ffmpeg_crf);
}
}
else if (strcmp(codec->name, "libaom-av1") == 0) {
else if (STREQ(codec->name, "libaom-av1")) {
/* Speed up libaom-av1 encoding by enabling multithreading and setting tiles. */
ffmpeg_dict_set_int(opts, "row-mt", 1);
const char *tiles_string = NULL;

View File

@ -3894,7 +3894,7 @@ static void ui_do_but_textedit(
}
if (event->type == WM_IME_COMPOSITE_EVENT && ime_data->result_len) {
if (ELEM(but->type, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER) &&
strcmp(ime_data->str_result, "\xE3\x80\x82") == 0) {
STREQ(ime_data->str_result, "\xE3\x80\x82")) {
/* Convert Ideographic Full Stop (U+3002) to decimal point when entering numbers. */
ui_textedit_insert_ascii(but, data, '.');
}