Move File-opening of PNG image into Png constructor (#2161)

Also rename `File::c_str` to `display_name` for clarity
This commit is contained in:
Rangi authored and GitHub committed 2026-09-27 13:19:05 -04:00
1 parent ac7d7edf4d
commit c0a16e4bad
6 files changed
+37 -22

No files matched your search

+1 -1
View File
@@ -47,7 +47,7 @@ public:
}
std::streambuf *operator->() { return &**this; }
char const *c_str(std::string const &path) const {
char const *display_name(std::string const &path) const {
return std::holds_alternative<std::filebuf>(_file) ? path.c_str()
: std::get<std::streambuf *>(_file) == std::cin.rdbuf() ? "<stdin>"
: "<stdout>";