diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-29 15:57:22 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-05 09:30:40 +0200 |
commit | 03e6cc9130864adcea5a1ae5440f24a9c128e8d6 (patch) | |
tree | 4d8245b295c316bc71dc713c4691322c27a37d12 /sc/inc/stlalgorithm.hxx | |
parent | loplugin:staticmethods (diff) | |
download | core-03e6cc9130864adcea5a1ae5440f24a9c128e8d6.tar.gz core-03e6cc9130864adcea5a1ae5440f24a9c128e8d6.zip |
loplugin:staticmethods
Change-Id: I912187d6c481a2ba61fed9c01998bf6f3c08a6a0
Diffstat (limited to 'sc/inc/stlalgorithm.hxx')
-rw-r--r-- | sc/inc/stlalgorithm.hxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/inc/stlalgorithm.hxx b/sc/inc/stlalgorithm.hxx index 6446097ed57b..7cc5eebafece 100644 --- a/sc/inc/stlalgorithm.hxx +++ b/sc/inc/stlalgorithm.hxx @@ -48,14 +48,14 @@ public: template<typename _Type2> AlignedAllocator(const AlignedAllocator<_Type2,_Alignment>&) {} - void construct(T* p, const value_type& val) { new(p) value_type(val); } - void destroy(T* p) + static void construct(T* p, const value_type& val) { new(p) value_type(val); } + static void destroy(T* p) { p->~value_type(); (void)p; // avoid bogus MSVC '12 "unreferenced formal parameter" warning } - size_type max_size() const + static size_type max_size() { return std::numeric_limits<size_type>::max() / sizeof(value_type); } @@ -63,12 +63,12 @@ public: bool operator== (const AlignedAllocator&) const { return true; } bool operator!= (const AlignedAllocator&) const { return false; } - pointer allocate(size_type n) + static pointer allocate(size_type n) { return static_cast<pointer>(rtl_allocateAlignedMemory(_Alignment, n*sizeof(value_type))); } - void deallocate(pointer p, size_type) + static void deallocate(pointer p, size_type) { rtl_freeAlignedMemory(p); } |