[C++] Uplift version to C++20
This commit is contained in:
committed by
Radosław Gliński
parent
a6e3d77504
commit
c3586bc165
@@ -99,7 +99,8 @@ class HIRBuilder {
|
||||
void CommentFormat(const std::string_view format, const Args&... args) {
|
||||
static const uint32_t kMaxCommentSize = 1024;
|
||||
char* p = reinterpret_cast<char*>(arena_->Alloc(kMaxCommentSize, 1));
|
||||
auto result = fmt::format_to_n(p, kMaxCommentSize - 1, format, args...);
|
||||
auto result =
|
||||
fmt::format_to_n(p, kMaxCommentSize - 1, fmt::runtime(format), args...);
|
||||
p[result.size] = '\0';
|
||||
size_t rewind = kMaxCommentSize - 1 - result.size;
|
||||
arena_->Rewind(rewind);
|
||||
|
||||
@@ -155,7 +155,7 @@ void PPCTranslator::DumpHIR(GuestFunction* function, PPCHIRBuilder* builder) {
|
||||
folder_path.append(&tmpbuf[0]);
|
||||
}
|
||||
|
||||
FILE* f = fopen(folder_path.generic_u8string().c_str(), "w");
|
||||
FILE* f = fopen(folder_path.string().c_str(), "w");
|
||||
if (f) {
|
||||
fputs(buffer.buffer(), f);
|
||||
fclose(f);
|
||||
|
||||
Reference in New Issue
Block a user