From c7d0ba0f26f683993542abc75c373827c4f1e5b3 Mon Sep 17 00:00:00 2001 From: Yuriy Skalko Date: Sun, 1 Nov 2020 22:39:21 +0200 Subject: [PATCH] Simplify bformat --- src/support/lstrings.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/support/lstrings.cpp b/src/support/lstrings.cpp index ad19d7f35d..f0e79b88b3 100644 --- a/src/support/lstrings.cpp +++ b/src/support/lstrings.cpp @@ -1544,11 +1544,7 @@ docstring bformat(docstring const & fmt, docstring const & arg1, int arg2) docstring bformat(docstring const & fmt, char const * arg1, docstring const & arg2) { - LATTEST(contains(fmt, from_ascii("%1$s"))); - LATTEST(contains(fmt, from_ascii("%2$s"))); - docstring str = subst(fmt, from_ascii("%1$s"), from_ascii(arg1)); - str = subst(str, from_ascii("%2$s"), arg2); - return subst(str, from_ascii("%%"), from_ascii("%")); + return bformat(fmt, from_ascii(arg1), arg2); } -- 2.39.5