Skip to content

Commit 28f8c70

Browse files
[arccore,collections] Corrige 'guarantedAlignment()' en 'guaranteedAlignment()'.
1 parent c11c75d commit 28f8c70

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

arccore/src/collections/arccore/collections/IMemoryAllocator.h

+9-1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ class ARCCORE_COLLECTIONS_EXPORT IMemoryAllocator
117117
*
118118
* S'il n'y a aucune garantie, retourne 0.
119119
*/
120+
virtual size_t guaranteedAlignment(MemoryAllocationArgs args) const;
121+
122+
/*!
123+
* \brief Valeur de l'alignement garanti par l'allocateur.
124+
*
125+
* \sa guaranteedAlignment()
126+
*/
127+
ARCCORE_DEPRECATED_REASON("Y2024: Use guaranteedAlignment() instead")
120128
virtual size_t guarantedAlignment(MemoryAllocationArgs args) const;
121129

122130
/*!
@@ -157,7 +165,7 @@ class ARCCORE_COLLECTIONS_EXPORT IMemoryAllocator
157165
virtual void deallocate(void* ptr) = 0;
158166
ARCCORE_DEPRECATED_REASON("Y2023: use adjustedCapacity(MemoryAllocationArgs,Int64,Int64) instead")
159167
virtual size_t adjustCapacity(size_t wanted_capacity, size_t element_size) = 0;
160-
ARCCORE_DEPRECATED_REASON("Y2023: use guarantedAlignment(MemoryAllocationArgs) instead")
168+
ARCCORE_DEPRECATED_REASON("Y2023: use guaranteedAlignment(MemoryAllocationArgs) instead")
161169
virtual size_t guarantedAlignment() = 0;
162170
};
163171

arccore/src/collections/arccore/collections/MemoryAllocator.cc

+9
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,15 @@ guarantedAlignment(MemoryAllocationArgs) const
441441
/*---------------------------------------------------------------------------*/
442442
/*---------------------------------------------------------------------------*/
443443

444+
size_t IMemoryAllocator::
445+
guaranteedAlignment(MemoryAllocationArgs args) const
446+
{
447+
return guarantedAlignment(args);
448+
}
449+
450+
/*---------------------------------------------------------------------------*/
451+
/*---------------------------------------------------------------------------*/
452+
444453
bool IMemoryAllocator3::
445454
hasRealloc() const
446455
{

arccore/src/collections/tests/TestArray.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ class TesterMemoryAllocatorV3
897897
size_t guarantedAlignment(MemoryAllocationArgs args) const override
898898
{
899899
_checkValid(args);
900-
return m_default_allocator.guarantedAlignment(args);
900+
return m_default_allocator.guaranteedAlignment(args);
901901
}
902902

903903
void notifyMemoryArgsChanged(MemoryAllocationArgs old_args, MemoryAllocationArgs new_args, AllocatedMemoryInfo ptr) override

0 commit comments

Comments
 (0)