Skip to content

Commit e2e80f5

Browse files
Merge pull request #1144 from arcaneframework/dev/gg-fix-bad-value-for-datatype
Fix bad value of 'DataType' in method 'Arccore::asSpanInternal()'
2 parents 54811d7 + d31b7af commit e2e80f5

File tree

1 file changed

+6
-6
lines changed
  • arccore/src/base/arccore/base

1 file changed

+6
-6
lines changed

arccore/src/base/arccore/base/Span.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
22
//-----------------------------------------------------------------------------
3-
// Copyright 2000-2023 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
3+
// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
44
// See the top-level COPYRIGHT file for details.
55
// SPDX-License-Identifier: Apache-2.0
66
//-----------------------------------------------------------------------------
77
/*---------------------------------------------------------------------------*/
8-
/* Span.h (C) 2000-2023 */
8+
/* Span.h (C) 2000-2024 */
99
/* */
1010
/* Vues sur des tableaux C. */
1111
/*---------------------------------------------------------------------------*/
@@ -854,11 +854,11 @@ asSpanInternal(Span<ByteType,Extent> bytes)
854854
Int64 size = bytes.size();
855855
if (size==0)
856856
return {};
857-
static constexpr Int64 data_type = static_cast<Int64>(sizeof(data_type));
858-
static_assert(data_type>0,"Bad datatype size");
859-
ARCCORE_ASSERT((size%data_type)==0,("Size is not a multiple of sizeof(DataType)"));
857+
static constexpr Int64 data_type_size = static_cast<Int64>(sizeof(DataType));
858+
static_assert(data_type_size>0,"Bad datatype size");
859+
ARCCORE_ASSERT((size%data_type_size)==0,("Size is not a multiple of sizeof(DataType)"));
860860
auto* ptr = reinterpret_cast<DataType*>(bytes.data());
861-
return { ptr, size / data_type };
861+
return { ptr, size / data_type_size };
862862
}
863863

864864
}

0 commit comments

Comments
 (0)