1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:37:46 +00:00

LibGfx/TIFF: Move Formatter<Rational>'s definition to TIFFMetadata.h

This will soon be used in TIFFTagHandler.cpp, so the definition needs to
be shared.
This commit is contained in:
Lucas CHOLLET 2023-12-02 19:51:29 -05:00 committed by Andreas Kling
parent 71fdf0860e
commit 1d345109c4
2 changed files with 12 additions and 13 deletions

View file

@ -511,11 +511,3 @@ ErrorOr<Optional<ReadonlyBytes>> TIFFImageDecoderPlugin::icc_data()
}
}
template<typename T>
struct AK::Formatter<Gfx::TIFF::Rational<T>> : Formatter<FormatString> {
ErrorOr<void> format(FormatBuilder& builder, Gfx::TIFF::Rational<T> value)
{
return Formatter<FormatString>::format(builder, "{} ({}/{})"sv, static_cast<double>(value.numerator) / value.denominator, value.numerator, value.denominator);
}
};