@@ -83,50 +83,50 @@ struct index_desc
8383
8484typedef Firebird::HalfStaticArray<index_desc, 16 > IndexDescList;
8585
86- const USHORT idx_invalid = USHORT(~0 ); // Applies to idx_id as special value
86+ inline constexpr USHORT idx_invalid = USHORT(~0 ); // Applies to idx_id as special value
8787
8888// index types and flags
8989
9090// See jrd/intl.h for notes on idx_itype and dsc_sub_type considerations
9191// idx_numeric .. idx_byte_array values are compatible with VMS values
9292
93- const int idx_numeric = 0 ;
94- const int idx_string = 1 ;
93+ inline constexpr int idx_numeric = 0 ;
94+ inline constexpr int idx_string = 1 ;
9595// value of 2 was used in ODS < 10
96- const int idx_byte_array = 3 ;
97- const int idx_metadata = 4 ;
98- const int idx_sql_date = 5 ;
99- const int idx_sql_time = 6 ;
100- const int idx_timestamp = 7 ;
101- const int idx_numeric2 = 8 ; // Introduced for 64-bit Integer support
102- const int idx_boolean = 9 ;
103- const int idx_decimal = 10 ;
104- const int idx_sql_time_tz = 11 ;
105- const int idx_timestamp_tz = 12 ;
106- const int idx_bcd = 13 ; // 128-bit Integer support
96+ inline constexpr int idx_byte_array = 3 ;
97+ inline constexpr int idx_metadata = 4 ;
98+ inline constexpr int idx_sql_date = 5 ;
99+ inline constexpr int idx_sql_time = 6 ;
100+ inline constexpr int idx_timestamp = 7 ;
101+ inline constexpr int idx_numeric2 = 8 ; // Introduced for 64-bit Integer support
102+ inline constexpr int idx_boolean = 9 ;
103+ inline constexpr int idx_decimal = 10 ;
104+ inline constexpr int idx_sql_time_tz = 11 ;
105+ inline constexpr int idx_timestamp_tz = 12 ;
106+ inline constexpr int idx_bcd = 13 ; // 128-bit Integer support
107107
108108// idx_itype space for future expansion
109- const int idx_first_intl_string = 64 ; // .. MAX (short) Range of computed key strings
109+ inline constexpr int idx_first_intl_string = 64 ; // .. MAX (short) Range of computed key strings
110110
111- const int idx_offset_intl_range = (0x7FFF + idx_first_intl_string);
111+ inline constexpr int idx_offset_intl_range = (0x7FFF + idx_first_intl_string);
112112
113113// these flags must match the irt_flags (see ods.h)
114114
115- const int idx_unique = 1 ;
116- const int idx_descending = 2 ;
117- const int idx_in_progress = 4 ;
118- const int idx_foreign = 8 ;
119- const int idx_primary = 16 ;
120- const int idx_expression = 32 ;
121- const int idx_condition = 64 ;
115+ inline constexpr int idx_unique = 1 ;
116+ inline constexpr int idx_descending = 2 ;
117+ inline constexpr int idx_in_progress = 4 ;
118+ inline constexpr int idx_foreign = 8 ;
119+ inline constexpr int idx_primary = 16 ;
120+ inline constexpr int idx_expression = 32 ;
121+ inline constexpr int idx_condition = 64 ;
122122
123123// these flags are for idx_runtime_flags
124124
125- const int idx_plan_dont_use = 1 ; // index is not mentioned in user-specified access plan
126- const int idx_plan_navigate = 2 ; // plan specifies index to be used for ordering
127- const int idx_used = 4 ; // index was in fact selected for retrieval
128- const int idx_navigate = 8 ; // index was in fact selected for navigation
129- const int idx_marker = 16 ; // marker used in procedure sort_indices
125+ inline constexpr int idx_plan_dont_use = 1 ; // index is not mentioned in user-specified access plan
126+ inline constexpr int idx_plan_navigate = 2 ; // plan specifies index to be used for ordering
127+ inline constexpr int idx_used = 4 ; // index was in fact selected for retrieval
128+ inline constexpr int idx_navigate = 8 ; // index was in fact selected for navigation
129+ inline constexpr int idx_marker = 16 ; // marker used in procedure sort_indices
130130
131131// Index insertion block -- parameter block for index insertions
132132
@@ -146,7 +146,7 @@ struct index_insertion
146146
147147// these flags are for the key_flags
148148
149- const int key_empty = 1 ; // Key contains empty data / empty string
149+ inline constexpr int key_empty = 1 ; // Key contains empty data / empty string
150150
151151// Temporary key block
152152
@@ -177,8 +177,8 @@ struct index_sort_record
177177};
178178#pragma pack()
179179
180- const int ISR_secondary = 1 ; // Record is secondary version
181- const int ISR_null = 2 ; // Record consists of NULL values only
180+ inline constexpr int ISR_secondary = 1 ; // Record is secondary version
181+ inline constexpr int ISR_null = 2 ; // Record consists of NULL values only
182182
183183
184184
@@ -227,21 +227,21 @@ class IndexRetrieval final
227227};
228228
229229// Flag values for irb_generic
230- const int irb_partial = 1 ; // Partial match: not all segments or starting of key only
231- const int irb_starting = 2 ; // Only compute "starting with" key for index segment
232- const int irb_equality = 4 ; // Probing index for equality match
233- const int irb_ignore_null_value_key = 8 ; // if lower bound is specified and upper bound unspecified,
234- // ignore looking at null value keys
235- const int irb_descending = 16 ; // Base index uses descending order
236- const int irb_exclude_lower = 32 ; // exclude lower bound keys while scanning index
237- const int irb_exclude_upper = 64 ; // exclude upper bound keys while scanning index
238- const int irb_multi_starting = 128 ; // Use INTL_KEY_MULTI_STARTING
239- const int irb_root_list_scan = 256 ; // Locate list items from the root
240- const int irb_unique = 512 ; // Unique match (currently used only for plan output)
230+ inline constexpr int irb_partial = 1 ; // Partial match: not all segments or starting of key only
231+ inline constexpr int irb_starting = 2 ; // Only compute "starting with" key for index segment
232+ inline constexpr int irb_equality = 4 ; // Probing index for equality match
233+ inline constexpr int irb_ignore_null_value_key = 8 ; // if lower bound is specified and upper bound unspecified,
234+ // ignore looking at null value keys
235+ inline constexpr int irb_descending = 16 ; // Base index uses descending order
236+ inline constexpr int irb_exclude_lower = 32 ; // exclude lower bound keys while scanning index
237+ inline constexpr int irb_exclude_upper = 64 ; // exclude upper bound keys while scanning index
238+ inline constexpr int irb_multi_starting = 128 ; // Use INTL_KEY_MULTI_STARTING
239+ inline constexpr int irb_root_list_scan = 256 ; // Locate list items from the root
240+ inline constexpr int irb_unique = 512 ; // Unique match (currently used only for plan output)
241241
242242// Force include flags - always include appropriate key while scanning index
243- const int irb_force_lower = irb_exclude_lower;
244- const int irb_force_upper = irb_exclude_upper;
243+ inline constexpr int irb_force_lower = irb_exclude_lower;
244+ inline constexpr int irb_force_upper = irb_exclude_upper;
245245
246246typedef Firebird::HalfStaticArray<float , 4 > SelectivityList;
247247
0 commit comments