From cead54b6e555fe907348943b4586e956771f6ad0 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 28 Jan 2015 17:53:30 +0100 Subject: Use vector::data ...in some places where it is obvious that it does not hurt that for an empty vector the obtained pointer is not necessarily a nullptr. Change-Id: Id5d66b1559ca8b8955d379bcdbfae6986ef46a51 --- connectivity/source/sdbcx/VCollection.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'connectivity/source/sdbcx') diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx index cc886dfd3584..c43cc185d92d 100644 --- a/connectivity/source/sdbcx/VCollection.cxx +++ b/connectivity/source/sdbcx/VCollection.cxx @@ -279,8 +279,7 @@ Sequence< Type > SAL_CALL OCollection::getTypes() throw (RuntimeException, std:: if ( *pBegin != aType ) aOwnTypes.push_back(*pBegin); } - Type* pTypes = aOwnTypes.empty() ? 0 : &aOwnTypes[0]; - return Sequence< Type >(pTypes,aOwnTypes.size()); + return Sequence< Type >(aOwnTypes.data(), aOwnTypes.size()); } return OCollectionBase::getTypes( ); } -- cgit