@@ -95,33 +95,33 @@ enum SortDirection { ORDER_ANY, ORDER_ASC, ORDER_DESC };
95
95
enum NullsPlacement { NULLS_DEFAULT, NULLS_FIRST, NULLS_LAST };
96
96
97
97
// CompilerScratch.csb_g_flags' values.
98
- const int csb_internal = 1 ; // "csb_g_flag" switch
99
- const int csb_get_dependencies = 2 ; // we are retrieving dependencies
100
- const int csb_ignore_perm = 4 ; // ignore permissions checks
101
- // const int csb_blr_version4 = 8; // the BLR is of version 4
102
- const int csb_pre_trigger = 16 ; // this is a BEFORE trigger
103
- const int csb_post_trigger = 32 ; // this is an AFTER trigger
104
- const int csb_validation = 64 ; // we're in a validation expression (RDB hack)
105
- const int csb_reuse_context = 128 ; // allow context reusage
106
- const int csb_subroutine = 256 ; // sub routine
107
- const int csb_reload = 512 ; // request's BLR should be loaded and parsed again
108
- const int csb_computed_field = 1024 ; // computed field expression
109
- const int csb_search_system_schema = 2048 ; // search system schema
98
+ inline constexpr int csb_internal = 1 ; // "csb_g_flag" switch
99
+ inline constexpr int csb_get_dependencies = 2 ; // we are retrieving dependencies
100
+ inline constexpr int csb_ignore_perm = 4 ; // ignore permissions checks
101
+ // inline constexpr int csb_blr_version4 = 8; // the BLR is of version 4
102
+ inline constexpr int csb_pre_trigger = 16 ; // this is a BEFORE trigger
103
+ inline constexpr int csb_post_trigger = 32 ; // this is an AFTER trigger
104
+ inline constexpr int csb_validation = 64 ; // we're in a validation expression (RDB hack)
105
+ inline constexpr int csb_reuse_context = 128 ; // allow context reusage
106
+ inline constexpr int csb_subroutine = 256 ; // sub routine
107
+ inline constexpr int csb_reload = 512 ; // request's BLR should be loaded and parsed again
108
+ inline constexpr int csb_computed_field = 1024 ; // computed field expression
109
+ inline constexpr int csb_search_system_schema = 2048 ; // search system schema
110
110
111
111
// CompilerScratch.csb_rpt[].csb_flags's values.
112
- const int csb_active = 1 ; // stream is active
113
- const int csb_used = 2 ; // context has already been defined (BLR parsing only)
114
- const int csb_view_update = 4 ; // view update w/wo trigger is in progress
115
- const int csb_trigger = 8 ; // NEW or OLD context in trigger
116
- // const int csb_no_dbkey = 16; // unused
117
- const int csb_store = 32 ; // we are processing a store statement
118
- const int csb_modify = 64 ; // we are processing a modify
119
- const int csb_sub_stream = 128 ; // a sub-stream of the RSE being processed
120
- const int csb_erase = 256 ; // we are processing an erase
121
- const int csb_unmatched = 512 ; // stream has conjuncts unmatched by any index
122
- const int csb_update = 1024 ; // erase or modify for relation
123
- const int csb_unstable = 2048 ; // unstable explicit cursor
124
- const int csb_skip_locked = 4096 ; // skip locked record
112
+ inline constexpr int csb_active = 1 ; // stream is active
113
+ inline constexpr int csb_used = 2 ; // context has already been defined (BLR parsing only)
114
+ inline constexpr int csb_view_update = 4 ; // view update w/wo trigger is in progress
115
+ inline constexpr int csb_trigger = 8 ; // NEW or OLD context in trigger
116
+ // inline constexpr int csb_no_dbkey = 16; // unused
117
+ inline constexpr int csb_store = 32 ; // we are processing a store statement
118
+ inline constexpr int csb_modify = 64 ; // we are processing a modify
119
+ inline constexpr int csb_sub_stream = 128 ; // a sub-stream of the RSE being processed
120
+ inline constexpr int csb_erase = 256 ; // we are processing an erase
121
+ inline constexpr int csb_unmatched = 512 ; // stream has conjuncts unmatched by any index
122
+ inline constexpr int csb_update = 1024 ; // erase or modify for relation
123
+ inline constexpr int csb_unstable = 2048 ; // unstable explicit cursor
124
+ inline constexpr int csb_skip_locked = 4096 ; // skip locked record
125
125
126
126
127
127
// Aggregate Sort Block (for DISTINCT aggregates)
@@ -185,7 +185,7 @@ struct Resource
185
185
Routine* rsc_routine; // Routine block
186
186
Collation* rsc_coll; // Collation block
187
187
188
- static bool greaterThan (const Resource& i1, const Resource& i2)
188
+ static bool greaterThan (const Resource& i1, const Resource& i2) noexcept
189
189
{
190
190
// A few places of the engine depend on fact that rsc_type
191
191
// is the first field in ResourceList ordering
@@ -200,7 +200,7 @@ struct Resource
200
200
return i1.rsc_id > i2.rsc_id ;
201
201
}
202
202
203
- Resource (rsc_s type, USHORT id, jrd_rel* rel, Routine* routine, Collation* coll)
203
+ Resource (rsc_s type, USHORT id, jrd_rel* rel, Routine* routine, Collation* coll) noexcept
204
204
: rsc_type(type), rsc_id(id), rsc_rel(rel), rsc_routine(routine), rsc_coll(coll)
205
205
{ }
206
206
};
@@ -327,14 +327,14 @@ struct Item
327
327
TYPE_CAST
328
328
};
329
329
330
- Item (Type aType, UCHAR aSubType, USHORT aIndex)
330
+ Item (Type aType, UCHAR aSubType, USHORT aIndex) noexcept
331
331
: type(aType),
332
332
subType (aSubType),
333
333
index(aIndex)
334
334
{
335
335
}
336
336
337
- Item (Type aType, USHORT aIndex = 0 )
337
+ Item (Type aType, USHORT aIndex = 0 ) noexcept
338
338
: type(aType),
339
339
subType(0 ),
340
340
index(aIndex)
@@ -345,7 +345,7 @@ struct Item
345
345
UCHAR subType;
346
346
USHORT index;
347
347
348
- bool operator >(const Item& x) const
348
+ bool operator >(const Item& x) const noexcept
349
349
{
350
350
if (type == x.type )
351
351
{
@@ -363,7 +363,7 @@ struct Item
363
363
364
364
struct FieldInfo
365
365
{
366
- FieldInfo ()
366
+ FieldInfo () noexcept
367
367
: nullable(false ), defaultValue(NULL ), validationExpr(NULL )
368
368
{}
369
369
@@ -393,7 +393,7 @@ class ItemInfo : public Printable
393
393
{
394
394
}
395
395
396
- ItemInfo ()
396
+ ItemInfo () noexcept
397
397
: name(),
398
398
field(),
399
399
nullable(true ),
@@ -403,7 +403,7 @@ class ItemInfo : public Printable
403
403
}
404
404
405
405
public:
406
- bool isSpecial () const
406
+ bool isSpecial () const noexcept
407
407
{
408
408
return !nullable || fullDomain;
409
409
}
@@ -543,7 +543,7 @@ class CompilerScratch : public pool_alloc<type_csb>
543
543
return csb_n_stream++;
544
544
}
545
545
546
- bool collectingDependencies () const
546
+ bool collectingDependencies () const noexcept
547
547
{
548
548
return (mainCsb ? mainCsb : this )->csb_g_flags & csb_get_dependencies;
549
549
}
@@ -654,10 +654,10 @@ class CompilerScratch : public pool_alloc<type_csb>
654
654
struct csb_repeat
655
655
{
656
656
// We must zero-initialize this one
657
- csb_repeat ();
657
+ csb_repeat () noexcept ;
658
658
659
- void activate ();
660
- void deactivate ();
659
+ void activate () noexcept ;
660
+ void deactivate () noexcept ;
661
661
QualifiedName getName (bool allowEmpty = true ) const ;
662
662
663
663
std::optional<USHORT> csb_cursor_number; // Cursor number for this stream
@@ -688,7 +688,7 @@ class CompilerScratch : public pool_alloc<type_csb>
688
688
};
689
689
690
690
// We must zero-initialize this one
691
- inline CompilerScratch::csb_repeat::csb_repeat ()
691
+ inline CompilerScratch::csb_repeat::csb_repeat () noexcept
692
692
: csb_stream(0 ),
693
693
csb_view_stream(0 ),
694
694
csb_flags(0 ),
@@ -709,12 +709,12 @@ inline CompilerScratch::csb_repeat::csb_repeat()
709
709
{
710
710
}
711
711
712
- inline void CompilerScratch::csb_repeat::activate ()
712
+ inline void CompilerScratch::csb_repeat::activate () noexcept
713
713
{
714
714
csb_flags |= csb_active;
715
715
}
716
716
717
- inline void CompilerScratch::csb_repeat::deactivate ()
717
+ inline void CompilerScratch::csb_repeat::deactivate () noexcept
718
718
{
719
719
csb_flags &= ~csb_active;
720
720
}
@@ -756,8 +756,8 @@ class StatusXcp
756
756
StatusXcp ();
757
757
758
758
void clear ();
759
- void init (const Jrd::FbStatusVector*);
760
- void copyTo (Jrd::FbStatusVector*) const ;
759
+ void init (const Jrd::FbStatusVector*) noexcept ;
760
+ void copyTo (Jrd::FbStatusVector*) const noexcept ;
761
761
bool success () const ;
762
762
SLONG as_gdscode () const ;
763
763
SLONG as_sqlcode () const ;
@@ -767,7 +767,7 @@ class StatusXcp
767
767
};
768
768
769
769
// must correspond to the declared size of RDB$EXCEPTIONS.RDB$MESSAGE
770
- const unsigned XCP_MESSAGE_LENGTH = 1023 ;
770
+ inline constexpr unsigned XCP_MESSAGE_LENGTH = 1023 ;
771
771
772
772
// Array which stores relative pointers to impure areas of invariant nodes
773
773
typedef Firebird::SortedArray<ULONG> VarInvariantArray;
0 commit comments