diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-02-24 14:09:52 +0000 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-05 08:17:26 -0500 |
commit | 1c5dfa9bd3c24fdeec92e8334461a70d07202f0f (patch) | |
tree | 554d001432abd5518f366eef314a0918a9b6c5e8 /sc/source/filter/inc | |
parent | loplugin: unnecessary destructor vbahelper..vcl (diff) | |
download | core-1c5dfa9bd3c24fdeec92e8334461a70d07202f0f.tar.gz core-1c5dfa9bd3c24fdeec92e8334461a70d07202f0f.zip |
vector::data seems more natural than &vector::front
Change-Id: I0ce48075ad186cf1f9bd3e13fa76269fa9819af1
(cherry picked from commit 3a74745367a73ed9351379fc32bbe9253cdae697)
(cherry picked from commit 3437713c11d60f99470fc1d0e2a8e5c56d5a6fe8)
Diffstat (limited to 'sc/source/filter/inc')
-rw-r--r-- | sc/source/filter/inc/fapihelper.hxx | 2 | ||||
-rw-r--r-- | sc/source/filter/inc/xlformula.hxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx index edde1c4211cf..649c8ac45698 100644 --- a/sc/source/filter/inc/fapihelper.hxx +++ b/sc/source/filter/inc/fapihelper.hxx @@ -89,7 +89,7 @@ template< typename Type > css::uno::Sequence< Type > ScfApiHelper::VectorToSequence( const ::std::vector< Type >& rVector ) { OSL_ENSURE( !rVector.empty(), "ScfApiHelper::VectorToSequence - vector is empty" ); - return css::uno::Sequence< Type >( &rVector.front(), static_cast< sal_Int32 >( rVector.size() ) ); + return css::uno::Sequence<Type>(rVector.data(), static_cast< sal_Int32 >(rVector.size())); } // Property sets ============================================================== diff --git a/sc/source/filter/inc/xlformula.hxx b/sc/source/filter/inc/xlformula.hxx index a5e9f9516b57..a0fcc25b35c6 100644 --- a/sc/source/filter/inc/xlformula.hxx +++ b/sc/source/filter/inc/xlformula.hxx @@ -387,7 +387,7 @@ public: /** Returns the size of the token array in bytes. */ sal_uInt16 GetSize() const; /** Returns read-only access to the byte vector storing token data. */ - inline const sal_uInt8* GetData() const { return maTokVec.empty() ? nullptr : &maTokVec.front(); } + inline const sal_uInt8* GetData() const { return maTokVec.empty() ? nullptr : maTokVec.data(); } /** Returns true, if the formula contains a volatile function. */ inline bool IsVolatile() const { return mbVolatile; } |