[vte/wip/sixels: 59/82] image: Remove .contains(), as it's no longer needed



commit 6507d20bba0ed5bf1bbfce067a44c652c9d8194b
Author: Hans Petter Jansson <hpj cl no>
Date:   Sun Jun 14 23:44:52 2020 +0200

    image: Remove .contains(), as it's no longer needed

 src/image.cc | 10 ----------
 src/image.hh |  1 -
 2 files changed, 11 deletions(-)
---
diff --git a/src/image.cc b/src/image.cc
index de998c8e..b7e13552 100644
--- a/src/image.cc
+++ b/src/image.cc
@@ -27,16 +27,6 @@ namespace vte {
 
 namespace image {
 
-/* Test whether this image contains given image */
-bool
-Image::contains(const Image &other) const noexcept
-{
-        return other.m_left_cells >= m_left_cells &&
-               other.m_top_cells >= m_top_cells &&
-               other.m_left_cells + other.m_width_cells <= m_left_cells + m_width_cells &&
-               other.m_top_cells + other.m_height_cells <= m_top_cells + m_height_cells;
-}
-
 /* Paint the image with provided cairo context */
 void
 Image::paint(cairo_t *cr, int offset_x, int offset_y, int cell_width, int cell_height) const noexcept
diff --git a/src/image.hh b/src/image.hh
index b79a71a6..9ffb83dd 100644
--- a/src/image.hh
+++ b/src/image.hh
@@ -73,7 +73,6 @@ public:
                 /* Not an image surface: Only the device knows for sure, so we guess */
                 return m_width_pixels * m_height_pixels * 4;
         }
-        bool contains(const Image &other) const noexcept;
         void paint(cairo_t *cr, gint offset_x, gint offset_y, int cell_width, int cell_height) const 
noexcept;
 };
 


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