[Libreoffice-commits] core.git: include/svl svl/source
Stephan Bergmann
sbergman at redhat.com
Thu Mar 9 16:08:51 UTC 2017
include/svl/aeitem.hxx | 4 +++-
svl/source/items/aeitem.cxx | 5 +++--
2 files changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 82e92bb15d26fff2d07736e2a6193cac1915b44d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Mar 9 17:08:14 2017 +0100
Clean up uses of integer types
Change-Id: I1155dfe3e2bcfe2c15c101c7373fcc9e161aa366
diff --git a/include/svl/aeitem.hxx b/include/svl/aeitem.hxx
index d203e23..c004e48 100644
--- a/include/svl/aeitem.hxx
+++ b/include/svl/aeitem.hxx
@@ -22,6 +22,8 @@
#include <svl/svldllapi.h>
#include <svl/poolitem.hxx>
#include <svl/eitem.hxx>
+
+#include <cstddef>
#include <vector>
class SfxAllEnumValueArr;
@@ -44,7 +46,7 @@ class SVL_DLLPUBLIC SfxAllEnumItem: public SfxAllEnumItem_Base
std::vector<sal_uInt16>* pDisabledValues;
sal_uInt16 GetPosByValue( sal_uInt16 nValue ) const;
- sal_uInt16 GetPosByValue_( sal_uInt16 nValue ) const;
+ std::size_t GetPosByValue_( sal_uInt16 nValue ) const;
public:
static SfxPoolItem* CreateDefault();
diff --git a/svl/source/items/aeitem.cxx b/svl/source/items/aeitem.cxx
index b10b36d..fdbca83 100644
--- a/svl/source/items/aeitem.cxx
+++ b/svl/source/items/aeitem.cxx
@@ -20,6 +20,7 @@
#include <rtl/ustring.hxx>
#include <svl/aeitem.hxx>
+#include <cstddef>
#include <vector>
SfxPoolItem* SfxAllEnumItem::CreateDefault() { return new SfxAllEnumItem; }
@@ -117,13 +118,13 @@ SfxPoolItem* SfxAllEnumItem::Create( SvStream & rStream, sal_uInt16 ) const
* In contrast to @see GetPosByValue(sal_uInt16) const
* this internal method returns the position the value would be for non-present values.
*/
-sal_uInt16 SfxAllEnumItem::GetPosByValue_( sal_uInt16 nVal ) const
+std::size_t SfxAllEnumItem::GetPosByValue_( sal_uInt16 nVal ) const
{
if ( !pValues )
return 0;
//FIXME: Optimisation: use binary search or SortArray
- sal_uInt16 nPos;
+ std::size_t nPos;
for ( nPos = 0; nPos < pValues->size(); ++nPos )
if ( (*pValues)[nPos].nValue >= nVal )
return nPos;
More information about the Libreoffice-commits
mailing list