fix compile errors on Linux https://github.com/cppformat/cppformat/issues/49
This commit is contained in:
parent
d74da670c1
commit
d38498a3a0
3 changed files with 5 additions and 13 deletions
src/bnetd
|
@ -474,7 +474,7 @@ namespace pvpgn
|
|||
if (unsigned int locktime = account_get_auth_locktime(account))
|
||||
msgtemp += localize(c, " for {}", seconds_to_timestr(locktime - now));
|
||||
else
|
||||
msgtemp += localize(c, " permanently", /**/);
|
||||
msgtemp += localize(c, " permanently");
|
||||
|
||||
// append reason
|
||||
char const * reason = account_get_auth_lockreason(account);
|
||||
|
|
|
@ -184,9 +184,9 @@ namespace pvpgn
|
|||
if (!(format = _find_string(fmt, lang)))
|
||||
format = fmt;
|
||||
|
||||
fmt::Writer w;
|
||||
w.format(format, args);
|
||||
output = w.str();
|
||||
fmt::Writer out;
|
||||
out.write(format, args);
|
||||
output = out.str();
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
|
|
|
@ -50,15 +50,7 @@ namespace pvpgn
|
|||
extern std::string _localize(t_connection * c, const char * func, const char *fmt, const fmt::ArgList &args);
|
||||
FMT_VARIADIC(std::string, _localize, t_connection *, const char *, const char *)
|
||||
|
||||
#if defined (_SOLARIS)
|
||||
#define localize(c, fmt, ...) _localize(c, __FUNCTION__, fmt, # __VA_ARGS__)
|
||||
/* optional: disables "warning: argument mismatch" */
|
||||
#pragma error_messages (off, E_ARGUEMENT_MISMATCH)
|
||||
#elif defined (__GNUC__)
|
||||
#define localize(c, fmt, s...) _localize(c, __FUNCTION__, fmt, ## s)
|
||||
#else
|
||||
#define localize(c, fmt, ...) _localize(c, __FUNCTION__, fmt, __VA_ARGS__)
|
||||
#endif
|
||||
#define localize(c, ...) _localize(c, __FUNCTION__, __VA_ARGS__)
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue