mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 16:57:34 +00:00
LibPDF: Add facility to obtain Vector<float> from ArrayObject
Arrays of float numbers are common in many PDF objects, and thus to avoid code repetition I'm introducing a new method to ArrayObject that will return exactly that.
This commit is contained in:
parent
a63b93f724
commit
17676705a5
2 changed files with 11 additions and 0 deletions
|
@ -74,6 +74,7 @@ public:
|
|||
|
||||
[[nodiscard]] ALWAYS_INLINE size_t size() const { return m_elements.size(); }
|
||||
[[nodiscard]] ALWAYS_INLINE Vector<Value> elements() const { return m_elements; }
|
||||
[[nodiscard]] Vector<float> float_elements() const;
|
||||
|
||||
ALWAYS_INLINE auto begin() const { return m_elements.begin(); }
|
||||
ALWAYS_INLINE auto end() const { return m_elements.end(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue