Nullary Formatter
to suppress “comparison of unsigned expression >= 0 is always true” warning
This commit is contained in:
parent
453f4a7d4f
commit
f4bda2df67
BIN
Resources/Maps/Title.vxl
Normal file
BIN
Resources/Maps/Title.vxl
Normal file
Binary file not shown.
@ -209,7 +209,19 @@ namespace spades {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
template<>
|
||||
class Formatter<0> {
|
||||
const char *fmt;
|
||||
public:
|
||||
Formatter(const char *fmt):fmt(fmt) {
|
||||
if(strchr(fmt, '{')) {
|
||||
SPRaise("Malformed format string (using non-existent parameter. no parameter provided): %s", fmt);
|
||||
}
|
||||
}
|
||||
std::string Format() {
|
||||
return fmt;
|
||||
}
|
||||
};
|
||||
|
||||
template<class ...T>
|
||||
std::string Format(const char *str, T... args) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user