commit c7d0ba0f26f683993542abc75c373827c4f1e5b3
Author: Yuriy Skalko <[email protected]>
Date: Sun Nov 1 22:39:21 2020 +0200
Simplify bformat
---
src/support/lstrings.cpp | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/src/support/lstrings.cpp b/src/support/lstrings.cpp
index ad19d7f..f0e79b8 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);
}
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs