mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-02 02:37:55 +00:00
Qualify calls to format
C++20 introduces `std::format` and we `using namespace std`, so some of these would be ambiguous in C++20.
This commit is contained in:
@@ -507,8 +507,8 @@ EX string from_hexstring(string o) {
|
||||
EX string as_cstring(string o) {
|
||||
string s = "string(\"";
|
||||
for(char c: o)
|
||||
s += format("\\x%02x", (unsigned char) c);
|
||||
s += format("\", %d)", isize(o));
|
||||
s += hr::format("\\x%02x", (unsigned char) c);
|
||||
s += hr::format("\", %d)", isize(o));
|
||||
return s;
|
||||
}
|
||||
|
||||
@@ -520,7 +520,7 @@ EX string as_nice_cstring(string o) {
|
||||
else if(c == 10)
|
||||
s += "\\n";
|
||||
else
|
||||
s += format("\\x%02x", (unsigned char) c);
|
||||
s += hr::format("\\x%02x", (unsigned char) c);
|
||||
s += "\"";
|
||||
return s;
|
||||
}
|
||||
|
Reference in New Issue
Block a user