@@ -104,15 +104,15 @@ class MemoryFontCache : public DeletedAtShutdown
104104public:
105105 using Value = AndroidCachedTypeface;
106106
107- ~MemoryFontCache ()
107+ ~MemoryFontCache () override
108108 {
109109 clearSingletonInstance ();
110110 }
111111
112112 struct Key
113113 {
114114 String name, style;
115- auto tie () const { return std::tuple (name, style); }
115+ [[nodiscard]] auto tie () const { return std::tuple (name, style); }
116116 bool operator < (const Key& other) const { return tie () < other.tie (); }
117117 bool operator == (const Key& other) const { return tie () == other.tie (); }
118118 };
@@ -481,7 +481,7 @@ class AndroidTypeface final : public Typeface,
481481 auto memory = loadFontAsset (font.getTypefaceName ());
482482
483483 if (! memory.isEmpty ())
484- return std::tuple ( memory, findNonPortableMetricsForAsset (font.getTypefaceName ())) ;
484+ return { memory, findNonPortableMetricsForAsset (font.getTypefaceName ()) } ;
485485
486486 const auto file = findFontFile (font);
487487
@@ -497,7 +497,7 @@ class AndroidTypeface final : public Typeface,
497497 MemoryBlock result;
498498 stream.readIntoMemoryBlock (result);
499499
500- return std::tuple ( stream.isExhausted () ? result : MemoryBlock{}, findNonPortableMetricsForFile (file)) ;
500+ return { stream.isExhausted () ? result : MemoryBlock{}, findNonPortableMetricsForFile (file) } ;
501501 }
502502
503503 static File findFontFile (const Font& font)
@@ -604,7 +604,7 @@ class AndroidTypeface final : public Typeface,
604604 return mapEntry;
605605 }
606606
607- static TypefaceAscentDescent findNonPortableMetricsForFile (File file)
607+ static TypefaceAscentDescent findNonPortableMetricsForFile (const File& file)
608608 {
609609 auto * env = getEnv ();
610610 const LocalRef typeface { env->CallStaticObjectMethod (TypefaceClass,
0 commit comments