flags: rename flags_to_string -> to_string

For consistency.
This commit is contained in:
Dirk-Jan C. Binnema 2022-04-10 12:30:59 +03:00
parent c6ff5f9ce3
commit 478ef67fc6
7 changed files with 7 additions and 7 deletions

View File

@ -27,7 +27,7 @@
using namespace Mu;
std::string
Mu::flags_to_string(Flags flags)
Mu::to_string(Flags flags)
{
std::string str;

View File

@ -328,7 +328,7 @@ flags_filter(Flags flags, MessageFlagCategory cat)
*
* @return string as a sequence of message-flag shortcuts
*/
std::string flags_to_string(Flags flags);
std::string to_string(Flags flags);
} // namespace Mu

View File

@ -480,7 +480,7 @@ determine_dst_filename(const std::string& file, Flags flags,
return std::move(parts.base);
const auto flagstr{
flags_to_string(
to_string(
flags_filter(
flags, MessageFlagCategory::Mailfile))};

View File

@ -191,7 +191,7 @@ test_mu_maildir_flags_from_path(void)
g_assert_true(!!res);
if (g_test_verbose())
g_print("%s -> <%s>\n", paths[i].path,
flags_to_string(res.value()).c_str());
to_string(res.value()).c_str());
g_assert_true(res.value() == paths[i].flags);
}
}

View File

@ -114,7 +114,7 @@ test_mu_msg_02(void)
g_assert_true(contacts[1].name.empty());
g_assert_true(contacts[1].email == "help-gnu-emacs@gnu.org");
g_print("flags: %s\n", Mu::flags_to_string(mu_msg_get_flags(msg)).c_str());
g_print("flags: %s\n", Mu::to_string(mu_msg_get_flags(msg)).c_str());
g_assert_true(mu_msg_get_flags(msg) == (Flags::Seen|Flags::MailingList));
mu_msg_unref(msg);

View File

@ -278,7 +278,7 @@ static const char*
flags_s(Flags flags)
{
static char buf[64];
const auto flagstr{flags_to_string(flags)};
const auto flagstr{to_string(flags)};
::strncpy(buf, flagstr.c_str(), sizeof(buf) - 1);

View File

@ -326,7 +326,7 @@ add_row(GtkTreeStore* store, MuMsg* msg, GtkTreeIter* treeiter)
from = empty_or_display_contact(mu_msg_get_from(msg));
to = empty_or_display_contact(mu_msg_get_to(msg));
flag_str = flags_to_string(mu_msg_get_flags(msg));
flag_str = to_string(mu_msg_get_flags(msg));
/* if (0) { */
/* GtkTreeIter myiter; */