mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Portability
- Added new 'format' overload to resolve compiler warnings on Solaris. Signed-off-by: Paul Beckingham <paul@beckingham.net>
This commit is contained in:
parent
0fe5887af8
commit
9fb015f72c
2 changed files with 13 additions and 0 deletions
12
src/text.cpp
12
src/text.cpp
|
@ -953,6 +953,18 @@ const std::string format (
|
||||||
return output;
|
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 format (
|
||||||
const std::string& fmt,
|
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&, int);
|
||||||
const std::string format (const std::string&, const std::string&, const std::string&);
|
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&, 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, const std::string&);
|
||||||
const std::string format (const std::string&, int, int);
|
const std::string format (const std::string&, int, int);
|
||||||
const std::string format (const std::string&, int, double);
|
const std::string format (const std::string&, int, double);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue