mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
LibGfx: Mark a few ICC:NamedColor2TagData methods as const
This commit is contained in:
parent
47cfcf5dca
commit
7ad11fa59a
Notes:
sideshowbarker
2024-07-16 23:58:58 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/7ad11fa59a Pull-request: https://github.com/SerenityOS/serenity/pull/17546
2 changed files with 5 additions and 5 deletions
|
@ -776,7 +776,7 @@ ErrorOr<NonnullRefPtr<NamedColor2TagData>> NamedColor2TagData::from_bytes(Readon
|
|||
move(prefix), move(suffix), move(root_names), move(pcs_coordinates), move(device_coordinates));
|
||||
}
|
||||
|
||||
ErrorOr<String> NamedColor2TagData::color_name(u32 index)
|
||||
ErrorOr<String> NamedColor2TagData::color_name(u32 index) const
|
||||
{
|
||||
StringBuilder builder;
|
||||
builder.append(prefix());
|
||||
|
|
|
@ -545,7 +545,7 @@ public:
|
|||
// "If this field is 0, device coordinates are not provided."
|
||||
u32 number_of_device_coordinates() const { return m_number_of_device_coordinates; }
|
||||
|
||||
u32 size() { return m_root_names.size(); }
|
||||
u32 size() const { return m_root_names.size(); }
|
||||
|
||||
// "In order to maintain maximum portability, it is strongly recommended that
|
||||
// special characters of the 7-bit ASCII set not be used."
|
||||
|
@ -554,13 +554,13 @@ public:
|
|||
String const& root_name(u32 index) const { return m_root_names[index]; } // "7-bit ASCII"
|
||||
|
||||
// Returns 7-bit ASCII.
|
||||
ErrorOr<String> color_name(u32 index);
|
||||
ErrorOr<String> color_name(u32 index) const;
|
||||
|
||||
// "The PCS representation corresponds to the header’s PCS field."
|
||||
XYZOrLAB const& pcs_coordinates(u32 index) { return m_pcs_coordinates[index]; }
|
||||
XYZOrLAB const& pcs_coordinates(u32 index) const { return m_pcs_coordinates[index]; }
|
||||
|
||||
// "The device representation corresponds to the header’s “data colour space” field."
|
||||
u16 const* device_coordinates(u32 index)
|
||||
u16 const* device_coordinates(u32 index) const
|
||||
{
|
||||
VERIFY((index + 1) * m_number_of_device_coordinates <= m_device_coordinates.size());
|
||||
return m_device_coordinates.data() + index * m_number_of_device_coordinates;
|
||||
|
|
Loading…
Reference in a new issue