[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - sd/source slideshow/source solenv/bin sw/source writerfilter/source
David Tardon
dtardon at redhat.com
Wed Jan 22 02:26:09 PST 2014
> commit 1ceda390389a3e7bf4b7bb72b533a355a0fa060d
> Author: Herbert D??rr <hdu at apache.org>
> Date: Tue Jan 21 14:09:37 2014 +0000
>
> #i123817# boost::shared_ptr doesn't have an implicit conversion to bool
>
> Constructs that expect it fail at least in XCode4's clang in C++11 mode.
> An implicit conversion from pointer to bool is already suspicious enough
> and a shared_ptr->pointer->bool conversion is even worse. Cleaning up
> the code fixes the build breaker seen in boost/libc++/clang environments.
>
> diff --git a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
> index ff088bf..003e3b6 100644
> --- a/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
> +++ b/sd/source/ui/slidesorter/view/SlsButtonBar.cxx
> @@ -469,7 +469,7 @@ void ButtonBar::Paint (
>
> bool ButtonBar::IsMouseOverButton (void) const
> {
> - return mpButtonUnderMouse;
> + return (mpButtonUnderMouse.get() != NULL);
FWIW, I think the idiomatic way to do this is bool(mpButtonUnderMouse).
D.
More information about the LibreOffice
mailing list