From d722f739208cbf9f16bcef199c4fbd837e833215 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 21 Jul 2023 17:37:42 +0100 Subject: Add a typedef for the Template::Replace map. --- include/stringutils.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'include/stringutils.h') diff --git a/include/stringutils.h b/include/stringutils.h index a7b040fd8..30710306e 100644 --- a/include/stringutils.h +++ b/include/stringutils.h @@ -155,12 +155,15 @@ namespace Percent namespace Template { + /** A mapping of variable names to their values. */ + typedef insp::flat_map VariableMap; + /** Replaces template variables like %foo% within a string. * @param str The string to template from. * @param vars The variables to replace within the string. * @return The specified string with all variables replaced within it. */ - CoreExport std::string Replace(const std::string& str, const insp::flat_map& vars); + CoreExport std::string Replace(const std::string& str, const VariableMap& vars); } /** Encapsulates a list of tokens in the format "* -FOO -BAR".*/ -- cgit v1.3.1-10-gc9f91