From 49685c39895af67d7ffcc50fdc02150b6ee44f72 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Tue, 5 Apr 2022 22:01:53 -0400 Subject: fix up a bunch of clang-tidy stuff mostly changing references, which i hope doesnt break stuff with models (TreeRow, iterators) since they gave me some strange problems in the past --- src/components/lazyimage.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/components/lazyimage.cpp') diff --git a/src/components/lazyimage.cpp b/src/components/lazyimage.cpp index 49bbdeb..1f005f3 100644 --- a/src/components/lazyimage.cpp +++ b/src/components/lazyimage.cpp @@ -1,4 +1,6 @@ #include "lazyimage.hpp" + +#include #include "abaddon.hpp" LazyImage::LazyImage(int w, int h, bool use_placeholder) @@ -9,8 +11,8 @@ LazyImage::LazyImage(int w, int h, bool use_placeholder) signal_draw().connect(sigc::mem_fun(*this, &LazyImage::OnDraw)); } -LazyImage::LazyImage(const std::string &url, int w, int h, bool use_placeholder) - : m_url(url) +LazyImage::LazyImage(std::string url, int w, int h, bool use_placeholder) + : m_url(std::move(url)) , m_width(w) , m_height(h) { if (use_placeholder) @@ -27,7 +29,7 @@ void LazyImage::SetURL(const std::string &url) { } bool LazyImage::OnDraw(const Cairo::RefPtr &context) { - if (!m_needs_request || m_url == "") return false; + if (!m_needs_request || m_url.empty()) return false; m_needs_request = false; if (m_animated) { -- cgit v1.2.3