aboutsummaryrefslogtreecommitdiff
path: root/modules/help.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2024-08-22 10:26:43 +0100
committerGravatar Sadie Powell2024-08-22 11:12:52 +0100
commit6b123d4bc61c2db8e379dd5e681834c4053e661d (patch)
tree77621bb30f54b0c444e31a78b2c5c9a67955b723 /modules/help.cpp
parentMerge branch 'insp4' into master. (diff)
Use C++20 <format> instead of fmtlib when available.
Diffstat (limited to 'modules/help.cpp')
-rw-r--r--modules/help.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/help.cpp b/modules/help.cpp
index 99662e399..ec7673a16 100644
--- a/modules/help.cpp
+++ b/modules/help.cpp
@@ -115,16 +115,16 @@ public:
// Attempt to read the help key.
const std::string key = tag->getString("key");
if (key.empty())
- throw ModuleException(this, fmt::format("<{}:key> is empty at {}", tag->name, tag->source.str()));
+ throw ModuleException(this, FMT::format("<{}:key> is empty at {}", tag->name, tag->source.str()));
else if (irc::equals(key, "index"))
- throw ModuleException(this, fmt::format("<{}:key> is set to \"index\" which is reserved at {}", tag->name, tag->source.str()));
+ throw ModuleException(this, FMT::format("<{}:key> is set to \"index\" which is reserved at {}", tag->name, tag->source.str()));
else if (key.length() > longestkey)
longestkey = key.length();
// Attempt to read the help value.
std::string value;
if (!tag->readString("value", value, true) || value.empty())
- throw ModuleException(this, fmt::format("<{}:value> is empty at {}", tag->name, tag->source.str()));
+ throw ModuleException(this, FMT::format("<{}:value> is empty at {}", tag->name, tag->source.str()));
// Parse the help body. Empty lines are replaced with a single
// space because some clients are unable to show blank lines.
@@ -134,10 +134,10 @@ public:
helpmsg.push_back(line.empty() ? " " : line);
// Read the help title and store the topic.
- const std::string title = tag->getString("title", fmt::format("*** Help for {}", key), 1);
+ const std::string title = tag->getString("title", FMT::format("*** Help for {}", key), 1);
if (!newhelp.emplace(key, HelpTopic(helpmsg, title)).second)
{
- throw ModuleException(this, fmt::format("<{}> tag with duplicate key '{}' at {}",
+ throw ModuleException(this, FMT::format("<{}> tag with duplicate key '{}' at {}",
tag->name, key, tag->source.str()));
}
}