Portability
- Added new 'format' overload to resolve compiler warnings on Solaris. Signed-off-by: Paul Beckingham <paul@beckingham.net>
This commit is contained in:
committed by
Paul Beckingham
parent
0fe5887af8
commit
9fb015f72c
12
src/text.cpp
12
src/text.cpp
@@ -953,6 +953,18 @@ const std::string format (
|
||||
return output;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::string format (
|
||||
const std::string& fmt,
|
||||
const std::string& arg1,
|
||||
double arg2)
|
||||
{
|
||||
std::string output = fmt;
|
||||
replace_positional (output, "{1}", arg1);
|
||||
replace_positional (output, "{2}", trim (format (arg2, 6, 3)));
|
||||
return output;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::string format (
|
||||
const std::string& fmt,
|
||||
|
||||
@@ -80,6 +80,7 @@ const std::string format (const std::string&, const std::string&);
|
||||
const std::string format (const std::string&, int);
|
||||
const std::string format (const std::string&, const std::string&, const std::string&);
|
||||
const std::string format (const std::string&, const std::string&, int);
|
||||
const std::string format (const std::string&, const std::string&, double);
|
||||
const std::string format (const std::string&, int, const std::string&);
|
||||
const std::string format (const std::string&, int, int);
|
||||
const std::string format (const std::string&, int, double);
|
||||
|
||||
Reference in New Issue
Block a user