Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


On Sat, May 30, 2015 at 08:04:54PM +0000, stephan.bergmann.tinderbox@googlemail.com wrote:

One of you broke the build of LibreOffice with your commit :-(
Please commit and push a fix ASAP!
/home/tinderbox/master/dbaccess/source/core/api/RowSetBase.cxx:1242:14: error: implicit 
conversion (IntegralCast) from 'bool' to 'int' [loplugin:implicitboolconversion]
            (m_pCache->isAfterLast() != isAfterLast()) || ( m_pCache->isBeforeFirst() != 
isBeforeFirst() ) ||
             ^~~~~~~~~~~~~~~~~~~~~~~
/home/tinderbox/master/dbaccess/source/core/api/RowSetBase.cxx:1242:61: error: implicit 
conversion (IntegralCast) from 'bool' to 'int' [loplugin:implicitboolconversion]
            (m_pCache->isAfterLast() != isAfterLast()) || ( m_pCache->isBeforeFirst() != 
isBeforeFirst() ) ||
                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~

Err... m_pCache->isBeforeFirst() and isBeforeFirst() having different
return types is ... weird. It seems to come from

commit fee4efcb54c8162955f6fe626d9b68c3b74b3068
Author: Noel Grandin <noel@peralex.com>
Date:   Thu Apr 17 11:16:55 2014 +0200

    dbaccess: sal_Bool->bool
    
    Change-Id: Ieb52470f9638b74898954db3890aaf2cf202290a

diff --git a/dbaccess/source/core/api/CacheSet.hxx b/dbaccess/source/core/api/CacheSet.hxx
index a06af91..a42c3ee 100644
--- a/dbaccess/source/core/api/CacheSet.hxx
+++ b/dbaccess/source/core/api/CacheSet.hxx
@@ -100,30 +100,30 @@ namespace dbaccess
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XClob > SAL_CALL 
getClob( sal_Int32 columnIndex ) throw(::com::su
         virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XArray > SAL_CALL 
getArray( sal_Int32 columnIndex ) throw(::com::
         // ::com::sun::star::sdbc::XResultSet
-        virtual sal_Bool SAL_CALL next(  ) throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException);
-        virtual sal_Bool SAL_CALL isBeforeFirst(  ) throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException);
-        virtual sal_Bool SAL_CALL isAfterLast(  ) throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException);
-        virtual sal_Bool SAL_CALL isFirst(  ) throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException);
-        virtual sal_Bool SAL_CALL isLast(  ) throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException);
+        virtual bool SAL_CALL next(  ) throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException);
+        virtual bool SAL_CALL isBeforeFirst(  ) throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException);
+        virtual bool SAL_CALL isAfterLast(  ) throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException);
+        virtual bool SAL_CALL isFirst(  ) throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException);
+        virtual bool SAL_CALL isLast(  ) throw(::com::sun::star::sdbc::SQLException, 
::com::sun::star::uno::RuntimeException);


Which changed dbaccess/source/core/api/CacheSet.hxx to bool return
types. But these are (copies of) the com::sun::star::sdbc::XResultSet
interface, so shouldn't those have stayed sal_Bool?


-- 
Lionel

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.