|
| 1 | +$NetBSD: patch-src_cache.cpp,v 1.1 2023/05/21 06:27:31 wiz Exp $ |
| 2 | + |
| 3 | +Adapt for fmtlib 10. |
| 4 | + |
| 5 | +--- src/cache.cpp.orig 2021-10-29 19:42:00.000000000 +0000 |
| 6 | ++++ src/cache.cpp |
| 7 | +@@ -263,9 +263,9 @@ namespace { |
| 8 | + |
| 9 | + if (!is) { |
| 10 | + if (s.warn_missing) { |
| 11 | +- Output::Warning("Image not found: {}/{}", s.directory, filename); |
| 12 | ++ Output::Warning("Image not found: {}/{}", std::string(s.directory), std::string(filename)); |
| 13 | + } else { |
| 14 | +- Output::Debug("Image not found: {}/{}", s.directory, filename); |
| 15 | ++ Output::Debug("Image not found: {}/{}", std::string(s.directory), std::string(filename)); |
| 16 | + bmp = CreateEmpty<T>(); |
| 17 | + } |
| 18 | + } else { |
| 19 | +@@ -274,7 +274,7 @@ namespace { |
| 20 | + T == Material::System ? Bitmap::Flag_System : 0); |
| 21 | + bmp = Bitmap::Create(std::move(is), transparent, flags); |
| 22 | + if (!bmp) { |
| 23 | +- Output::Warning("Invalid image: {}/{}", s.directory, filename); |
| 24 | ++ Output::Warning("Invalid image: {}/{}", std::string(s.directory), std::string(filename)); |
| 25 | + } |
| 26 | + } |
| 27 | + } |
| 28 | +@@ -307,7 +307,7 @@ namespace { |
| 29 | + |
| 30 | + if (w < min_w || max_w < w || h < min_h || max_h < h) { |
| 31 | + Output::Debug("Image size out of bounds: {}/{} ({}x{} < {}x{} < {}x{})", |
| 32 | +- s.directory, filename, min_w, min_h, w, h, max_w, max_h); |
| 33 | ++ std::string(s.directory), std::string(filename), min_w, min_h, w, h, max_w, max_h); |
| 34 | + } |
| 35 | + } |
| 36 | + |
| 37 | +@@ -357,7 +357,7 @@ BitmapRef Cache::Faceset(StringView file |
| 38 | + } |
| 39 | + |
| 40 | + BitmapRef Cache::Frame(StringView file, bool transparent) { |
| 41 | +- return LoadBitmap<Material::Frame>(file, transparent); |
| 42 | ++ return LoadBitmap<Material::Frame>(std::string(file), transparent); |
| 43 | + } |
| 44 | + |
| 45 | + BitmapRef Cache::Gameover(StringView file) { |
0 commit comments