mirror of
https://github.com/DarkStore-3DS/DarkStore.git
synced 2026-07-03 00:39:02 +00:00
A bunch of minor tweaks from cppcheck
This commit is contained in:
@@ -107,11 +107,11 @@ std::string StringUtils::GetMarkString(int marks) {
|
||||
return out;
|
||||
}
|
||||
|
||||
std::string StringUtils::format(const std::string &fmt_str, ...) {
|
||||
std::string StringUtils::format(const char *fmt_str, ...) {
|
||||
va_list ap;
|
||||
char *fp = nullptr;
|
||||
va_start(ap, fmt_str);
|
||||
vasprintf(&fp, fmt_str.c_str(), ap);
|
||||
vasprintf(&fp, fmt_str, ap);
|
||||
va_end(ap);
|
||||
|
||||
std::unique_ptr<char, decltype(free) *> formatted(fp, free);
|
||||
|
||||
Reference in New Issue
Block a user