summaryrefslogtreecommitdiff
path: root/src/image.hh
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2020-12-01 22:05:58 +0100
committerChristian Persch <chpe@src.gnome.org>2020-12-01 22:05:58 +0100
commitcede6dac6bd281ebcf1e259b25079ceafb39ea0b (patch)
tree7487234c0d41c252eae956e44b00d358e004d501 /src/image.hh
parent5d74cff80f63022a9d39f6dc598013da5a5b1412 (diff)
downloadvte-cede6dac6bd281ebcf1e259b25079ceafb39ea0b.tar.gz
ring: Fix image memory leak
... and various code correctness and style issues. Use unique_ptr instead of naked new/delete, and use a std::multimap for m_image_by_top_map. https://gitlab.gnome.org/GNOME/vte/-/issues/255
Diffstat (limited to 'src/image.hh')
-rw-r--r--src/image.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/image.hh b/src/image.hh
index 5fc031ca..c61c5405 100644
--- a/src/image.hh
+++ b/src/image.hh
@@ -31,7 +31,7 @@ private:
vte::Freeable<cairo_surface_t> m_surface{};
// Draw/prune priority, must be unique
- int m_priority;
+ size_t m_priority;
// Image dimensions in pixels
int m_width_pixels;
@@ -47,7 +47,7 @@ private:
public:
Image(vte::Freeable<cairo_surface_t> surface,
- int priority,
+ size_t priority,
int width_pixels,
int height_pixels,
int col,