fix: use new format to replace all printf as much as possible.
- ironpad is a very conservative module so I don't want to bring any changes for it except bug fix.
This commit is contained in:
@ -27,6 +27,7 @@
|
|||||||
#define REINTERPRET ::yycc::string::reinterpret
|
#define REINTERPRET ::yycc::string::reinterpret
|
||||||
#define WINFCT ::yycc::windows::winfct
|
#define WINFCT ::yycc::windows::winfct
|
||||||
#define FOPEN ::yycc::patch::fopen
|
#define FOPEN ::yycc::patch::fopen
|
||||||
|
|
||||||
using namespace std::literals::string_view_literals;
|
using namespace std::literals::string_view_literals;
|
||||||
|
|
||||||
namespace yycc::carton::ironpad {
|
namespace yycc::carton::ironpad {
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
|
|
||||||
namespace yycc::patch::format {
|
namespace yycc::patch::format {
|
||||||
|
|
||||||
// TODO: all use of OP::printf should also switch to this function if possible.
|
|
||||||
|
|
||||||
template<class... Args>
|
template<class... Args>
|
||||||
std::string format(std::format_string<Args...> fmt, Args&&... args) {
|
std::string format(std::format_string<Args...> fmt, Args&&... args) {
|
||||||
return std::vformat(fmt.get(), std::make_format_args(args...));
|
return std::vformat(fmt.get(), std::make_format_args(args...));
|
||||||
|
Reference in New Issue
Block a user