[vte/wip/sixels: 74/111] image: get_top() and get_bottom() aren't constexpr anymore




commit d41c42e6b768224300d059d458cfb9944d574908
Author: Hans Petter Jansson <hpj cl no>
Date:   Sat Aug 8 20:42:49 2020 +0200

    image: get_top() and get_bottom() aren't constexpr anymore
    
    The top offset of an image can change during its lifetime due to
    rewrapping.

 src/image.hh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/image.hh b/src/image.hh
index 9056274e..a322bfa3 100644
--- a/src/image.hh
+++ b/src/image.hh
@@ -64,11 +64,11 @@ public:
 
         inline constexpr auto get_priority() const noexcept { return m_priority; }
         inline constexpr auto get_left() const noexcept { return m_left_cells; }
-        inline constexpr auto get_top() const noexcept { return m_top_cells; }
+        inline auto get_top() const noexcept { return m_top_cells; }
         inline void set_top(int row) noexcept { m_top_cells = row; }
         inline constexpr auto get_width() const noexcept { return (m_width_pixels + m_cell_width - 1) / 
m_cell_width; }
         inline constexpr auto get_height() const noexcept { return (m_height_pixels + m_cell_height - 1) / 
m_cell_height; }
-        inline constexpr auto get_bottom() const noexcept { return m_top_cells + get_height() - 1; }
+        inline auto get_bottom() const noexcept { return m_top_cells + get_height() - 1; }
         inline auto resource_size() const noexcept {
                 if (cairo_image_surface_get_stride(m_surface.get()) != 0)
                         return cairo_image_surface_get_stride(m_surface.get()) * m_height_pixels;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]