*: update code for Mu::MessageFlags

Migrate the code to use the new niceness
This commit is contained in:
Dirk-Jan C. Binnema
2022-02-16 22:06:00 +02:00
parent 473134a7b1
commit f6f17d5d6b
8 changed files with 136 additions and 237 deletions

View File

@ -116,13 +116,13 @@ process_value(const std::string& field, const std::string& value)
return std::string(1, value[0]);
} break;
case MU_MSG_FIELD_ID_FLAGS: {
const auto flag = mu_flag_char_from_name(value.c_str());
if (flag)
return std::string(1, tolower(flag));
} break;
case MU_MSG_FIELD_ID_FLAGS:
if (const auto info{message_flag_info(value)}; info)
return std::string(1, ::tolower(info->shortcut));
break;
default: break;
default:
break;
}
return value; // XXX prio/flags, etc. alias