lstrings.[Ch]: use string const & instead of char const * for format

more in line with the other args whcih are already string


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6974 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-05-16 14:59:48 +00:00
parent 356e26b3c1
commit a9d83a8583
3 changed files with 13 additions and 9 deletions

View File

@ -1,4 +1,8 @@
2003-05-15 André Pönitz <poenitz@gmx.net>
* lstrings.[Ch]: use string const & instead of char const * for format
2003-05-12 André Pönitz <poenitz@gmx.net>
* tostr.[Ch]: add long int overload

View File

@ -676,18 +676,18 @@ string const getStringFromVector(vector<string> const & vec,
#if USE_BOOST_FORMAT
string bformat(char const * fmt, string const & arg1)
string bformat(string const & fmt, string const & arg1)
{
return STRCONV((boost::format(fmt) % STRCONV(arg1)).str());
}
string bformat(char const * fmt, string const & arg1, string const & arg2)
string bformat(string const & fmt, string const & arg1, string const & arg2)
{
return STRCONV((boost::format(fmt) % STRCONV(arg1) % STRCONV(arg2)).str());
}
string bformat(char const * fmt, string const & arg1, string const & arg2,
string bformat(string const & fmt, string const & arg1, string const & arg2,
string const & arg3, string const & arg4)
{
return STRCONV((boost::format(fmt) % STRCONV(arg1) % STRCONV(arg2)
@ -696,7 +696,7 @@ string bformat(char const * fmt, string const & arg1, string const & arg2,
#else
string bformat(char const * fmt, string const & arg1)
string bformat(string const & fmt, string const & arg1)
{
lyx::Assert(contains(fmt, "%1$s"));
string const str = subst(fmt, "%1$s", arg1);
@ -704,7 +704,7 @@ string bformat(char const * fmt, string const & arg1)
}
string bformat(char const * fmt, string const & arg1, string const & arg2)
string bformat(string const & fmt, string const & arg1, string const & arg2)
{
lyx::Assert(contains(fmt, "%1$s"));
lyx::Assert(contains(fmt, "%2$s"));

View File

@ -210,14 +210,14 @@ string const getStringFromVector(std::vector<string> const & vec,
string const & delim = ",");
// wrapper around boost::format using one argument %1$s
string bformat(char const * fmt, string const & arg1);
string bformat(string const & fmt, string const & arg1);
// arguments %1$s and %2$s
string bformat(char const * fmt, string const & arg1, string const & arg2);
string bformat(string const & fmt, string const & arg1, string const & arg2);
// arguments %1$s and %2$s and %3$s
string bformat(char const * fmt, string const & arg1, string const & arg2,
string bformat(string const & fmt, string const & arg1, string const & arg2,
string const & arg3);
// arguments %1$s and %2$s and %3$s and %4$s
string bformat(char const * fmt, string const & arg1, string const & arg2,
string bformat(string const & fmt, string const & arg1, string const & arg2,
string const & arg3, string const & arg4);
#endif