Fix compilation problem

This commit is contained in:
Richard Kimberly Heck 2020-04-26 03:04:06 -04:00
parent 57065afb45
commit c92b4f27ec
2 changed files with 10 additions and 0 deletions

View File

@ -1507,6 +1507,14 @@ docstring bformat(docstring const & fmt, unsigned int arg1)
}
docstring bformat(docstring const & fmt, pit_type arg1)
{
LATTEST(contains(fmt, from_ascii("%1$d")));
docstring const str = subst(fmt, from_ascii("%1$d"), convert<docstring>(arg1));
return subst(str, from_ascii("%%"), from_ascii("%"));
}
docstring bformat(docstring const & fmt, docstring const & arg1)
{
LATTEST(contains(fmt, from_ascii("%1$s")));

View File

@ -17,6 +17,7 @@
#define LSTRINGS_H
#include "support/docstring.h"
#include "support/types.h"
#include <vector>
@ -369,6 +370,7 @@ docstring bformat(docstring const & fmt, long arg1);
docstring bformat(docstring const & fmt, long long arg1);
#endif
docstring bformat(docstring const & fmt, unsigned int arg1);
docstring bformat(docstring const & fmt, pit_type arg1);
docstring bformat(docstring const & fmt, docstring const & arg1);
docstring bformat(docstring const & fmt, char * arg1);
docstring bformat(docstring const & fmt, docstring const & arg1, docstring const & arg2);