Skip to content

Commit 4858436

Browse files
committed
Remove old sprintf code
1 parent ffd3382 commit 4858436

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

qt/qtcharatercreator.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
#include <algorithm>
66
#include <QApplication>
77
#include <QScreen>
8+
#include <string>
89
#include "qtcharatercreator.hpp"
910

1011
inline QString StringValue(const uint64_t value) {
11-
char buffer[10];
12-
sprintf(buffer, "%lu", value);
13-
return {buffer};
12+
const std::string string_value = std::to_string(value);
13+
return {string_value.c_str()};
1414
}
1515

1616
inline std::string StripShortcuts(const QString &value) {

0 commit comments

Comments
 (0)