Skip to content

Commit 28835be

Browse files
committed
Constexpr in align
1 parent b5d12cf commit 28835be

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/jrd/align.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Maximum alignments for corresponding data types are defined in dsc.h
4242
* value is greater than blr_blob_id, be sure to change the next define,
4343
* and also add the required entries to all of the arrays below.
4444
*/
45-
const unsigned char DTYPE_BLR_MAX = blr_blob_id;
45+
inline constexpr unsigned char DTYPE_BLR_MAX = blr_blob_id;
4646

4747
/*
4848
the blr types are defined in blr.h
@@ -54,7 +54,7 @@ No need to worry about blr_blob or ?blr_blob_id
5454
#include "../common/dsc.h"
5555
#include "../jrd/RecordNumber.h"
5656

57-
static const USHORT gds_cvt_blr_dtype[DTYPE_BLR_MAX + 1] =
57+
static inline constexpr USHORT gds_cvt_blr_dtype[DTYPE_BLR_MAX + 1] =
5858
{
5959
0, 0, 0, 0, 0, 0, 0,
6060
dtype_short, /* blr_short == 7 */
@@ -88,7 +88,7 @@ static const USHORT gds_cvt_blr_dtype[DTYPE_BLR_MAX + 1] =
8888
0, 0, 0, 0
8989
};
9090

91-
static const USHORT type_alignments[DTYPE_TYPE_MAX] =
91+
static inline constexpr USHORT type_alignments[DTYPE_TYPE_MAX] =
9292
{
9393
0,
9494
0, /* dtype_text */
@@ -121,7 +121,7 @@ static const USHORT type_alignments[DTYPE_TYPE_MAX] =
121121
sizeof(GDS_DATE) /* dtype_ex_timestamp_tz */
122122
};
123123

124-
static const USHORT type_lengths[DTYPE_TYPE_MAX] =
124+
static inline constexpr USHORT type_lengths[DTYPE_TYPE_MAX] =
125125
{
126126
0,
127127
0, /* dtype_text */
@@ -157,7 +157,7 @@ static const USHORT type_lengths[DTYPE_TYPE_MAX] =
157157

158158
// This table is only used by gpre's cme.cpp.
159159
// float, double are numbers from IEEE floating-point standard (IEEE 754)
160-
static const USHORT type_significant_bits[DTYPE_TYPE_MAX] =
160+
static inline constexpr USHORT type_significant_bits[DTYPE_TYPE_MAX] =
161161
{
162162
0,
163163
0, /* dtype_text */

0 commit comments

Comments
 (0)