1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

Android: Address some clang-tidy warnings in Android Studio

This commit is contained in:
Anthony Nicholls 2025-07-23 17:36:52 +01:00 committed by Anthony Nicholls
parent 5b0a2b9b80
commit a5dedd36d5

View file

@ -104,7 +104,7 @@ class MemoryFontCache : public DeletedAtShutdown
public:
using Value = AndroidCachedTypeface;
~MemoryFontCache()
~MemoryFontCache() override
{
clearSingletonInstance();
}
@ -112,7 +112,7 @@ public:
struct Key
{
String name, style;
auto tie() const { return std::tuple (name, style); }
[[nodiscard]] auto tie() const { return std::tuple (name, style); }
bool operator< (const Key& other) const { return tie() < other.tie(); }
bool operator== (const Key& other) const { return tie() == other.tie(); }
};
@ -481,7 +481,7 @@ private:
auto memory = loadFontAsset (font.getTypefaceName());
if (! memory.isEmpty())
return std::tuple (memory, findNonPortableMetricsForAsset (font.getTypefaceName()));
return { memory, findNonPortableMetricsForAsset (font.getTypefaceName()) };
const auto file = findFontFile (font);
@ -497,7 +497,7 @@ private:
MemoryBlock result;
stream.readIntoMemoryBlock (result);
return std::tuple (stream.isExhausted() ? result : MemoryBlock{}, findNonPortableMetricsForFile (file));
return { stream.isExhausted() ? result : MemoryBlock{}, findNonPortableMetricsForFile (file) };
}
static File findFontFile (const Font& font)
@ -604,7 +604,7 @@ private:
return mapEntry;
}
static TypefaceAscentDescent findNonPortableMetricsForFile (File file)
static TypefaceAscentDescent findNonPortableMetricsForFile (const File& file)
{
auto* env = getEnv();
const LocalRef typeface { env->CallStaticObjectMethod (TypefaceClass,