Reported by @mbajor on irc
[ 241s] /home/abuild/rpmbuild/BUILD/rawtherapee-4.2.1197/rtengine/../rtgui/guiutils.h:440:16: error: cannot convert 'Cairo::RefPtr
[ 241s] return surface;
using libcairo 1.14 it builds
@mbajor Can you test this patch please?
diff --git a/rtgui/guiutils.h b/rtgui/guiutils.h
index 38f5297..b8e058e 100644
--- a/rtgui/guiutils.h
+++ b/rtgui/guiutils.h
@@ -437,7 +437,7 @@ public:
// you have to check if the surface is created thanks to surfaceCreated before starting to draw on it
bool surfaceCreated()
{
- return surface;
+ return static_cast<bool>(surface);
}
Cairo::RefPtr<Cairo::ImageSurface> getSurface()
{
@heckflosse Fix confirmed. Thanks ! :)
@Beep6581 @Floessie @Hombre57
Any objections to commit this in master branch?
No objection on committing.
Just for my personal information: isn't bool(surface) the same than static_cast<bool>(surface); ?
@heckflosse Absolutely no objections. I would have solved it exactly the same way.
@Hombre57
Just for my personal information: isn't bool(surface) the same than static_cast
(surface); ?
No. A C-style cast is equivalent to reinterpret_cast<>, which has no restrictions at all. For a static_cast<> the types have to be convertible. But you are right: In this place a c'tor-like C-style cast would have also done, although a C++-style cast should be prefered as it's more meaningful.
Best
Fl枚ssie
Most helpful comment
@mbajor Can you test this patch please?