[Libreoffice-commits] core.git: dbaccess/source

Mike Kaganski mike.kaganski at collabora.com
Mon Nov 6 19:53:38 UTC 2017


 dbaccess/source/core/dataaccess/ModelImpl.cxx |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 95d351871886e8c72f34e68140dade4fc21ad18b
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Mon Nov 6 16:44:35 2017 +0200

    Use std::initializer_list to construct Sequence
    
    Change-Id: I5b3b97922befbe094c0ebe9adf4f195a83cd24af
    Reviewed-on: https://gerrit.libreoffice.org/44365
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 27b9f6fe8069..48643a9c4892 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -470,14 +470,14 @@ void ODatabaseModelImpl::impl_construct_nothrow()
     try
     {
         // the set of property value types in the bag is limited:
-        Sequence< Type > aAllowedTypes(6);
-        Type* pAllowedType = aAllowedTypes.getArray();
-        *pAllowedType++ = ::cppu::UnoType<sal_Bool>::get();
-        *pAllowedType++ = ::cppu::UnoType<double>::get();
-        *pAllowedType++ = ::cppu::UnoType<OUString>::get();
-        *pAllowedType++ = ::cppu::UnoType<sal_Int32>::get();
-        *pAllowedType++ = ::cppu::UnoType<sal_Int16>::get();
-        *pAllowedType++ = cppu::UnoType<Sequence< Any >>::get();
+        Sequence< Type > aAllowedTypes({
+             cppu::UnoType<sal_Bool>::get(),
+             cppu::UnoType<double>::get(),
+             cppu::UnoType<OUString>::get(),
+             cppu::UnoType<sal_Int32>::get(),
+             cppu::UnoType<sal_Int16>::get(),
+             cppu::UnoType<Sequence< Any >>::get(),
+        });
 
         m_xSettings = PropertyBag::createWithTypes( m_aContext, aAllowedTypes, false/*AllowEmptyPropertyName*/, true/*AutomaticAddition*/ );
 


More information about the Libreoffice-commits mailing list