@@ -95,33 +95,33 @@ enum SortDirection { ORDER_ANY, ORDER_ASC, ORDER_DESC };
9595enum NullsPlacement { NULLS_DEFAULT, NULLS_FIRST, NULLS_LAST };
9696
9797// 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
110110
111111// 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
125125
126126
127127// Aggregate Sort Block (for DISTINCT aggregates)
@@ -185,7 +185,7 @@ struct Resource
185185 Routine* rsc_routine; // Routine block
186186 Collation* rsc_coll; // Collation block
187187
188- static bool greaterThan (const Resource& i1, const Resource& i2)
188+ static bool greaterThan (const Resource& i1, const Resource& i2) noexcept
189189 {
190190 // A few places of the engine depend on fact that rsc_type
191191 // is the first field in ResourceList ordering
@@ -200,7 +200,7 @@ struct Resource
200200 return i1.rsc_id > i2.rsc_id ;
201201 }
202202
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
204204 : rsc_type(type), rsc_id(id), rsc_rel(rel), rsc_routine(routine), rsc_coll(coll)
205205 { }
206206};
@@ -327,14 +327,14 @@ struct Item
327327 TYPE_CAST
328328 };
329329
330- Item (Type aType, UCHAR aSubType, USHORT aIndex)
330+ Item (Type aType, UCHAR aSubType, USHORT aIndex) noexcept
331331 : type(aType),
332332 subType (aSubType),
333333 index(aIndex)
334334 {
335335 }
336336
337- Item (Type aType, USHORT aIndex = 0 )
337+ Item (Type aType, USHORT aIndex = 0 ) noexcept
338338 : type(aType),
339339 subType(0 ),
340340 index(aIndex)
@@ -345,7 +345,7 @@ struct Item
345345 UCHAR subType;
346346 USHORT index;
347347
348- bool operator >(const Item& x) const
348+ bool operator >(const Item& x) const noexcept
349349 {
350350 if (type == x.type )
351351 {
@@ -363,7 +363,7 @@ struct Item
363363
364364struct FieldInfo
365365{
366- FieldInfo ()
366+ FieldInfo () noexcept
367367 : nullable(false ), defaultValue(NULL ), validationExpr(NULL )
368368 {}
369369
@@ -393,7 +393,7 @@ class ItemInfo : public Printable
393393 {
394394 }
395395
396- ItemInfo ()
396+ ItemInfo () noexcept
397397 : name(),
398398 field(),
399399 nullable(true ),
@@ -403,7 +403,7 @@ class ItemInfo : public Printable
403403 }
404404
405405public:
406- bool isSpecial () const
406+ bool isSpecial () const noexcept
407407 {
408408 return !nullable || fullDomain;
409409 }
@@ -543,7 +543,7 @@ class CompilerScratch : public pool_alloc<type_csb>
543543 return csb_n_stream++;
544544 }
545545
546- bool collectingDependencies () const
546+ bool collectingDependencies () const noexcept
547547 {
548548 return (mainCsb ? mainCsb : this )->csb_g_flags & csb_get_dependencies;
549549 }
@@ -654,10 +654,10 @@ class CompilerScratch : public pool_alloc<type_csb>
654654 struct csb_repeat
655655 {
656656 // We must zero-initialize this one
657- csb_repeat ();
657+ csb_repeat () noexcept ;
658658
659- void activate ();
660- void deactivate ();
659+ void activate () noexcept ;
660+ void deactivate () noexcept ;
661661 QualifiedName getName (bool allowEmpty = true ) const ;
662662
663663 std::optional<USHORT> csb_cursor_number; // Cursor number for this stream
@@ -688,7 +688,7 @@ class CompilerScratch : public pool_alloc<type_csb>
688688};
689689
690690 // We must zero-initialize this one
691- inline CompilerScratch::csb_repeat::csb_repeat ()
691+ inline CompilerScratch::csb_repeat::csb_repeat () noexcept
692692 : csb_stream(0 ),
693693 csb_view_stream(0 ),
694694 csb_flags(0 ),
@@ -709,12 +709,12 @@ inline CompilerScratch::csb_repeat::csb_repeat()
709709{
710710}
711711
712- inline void CompilerScratch::csb_repeat::activate ()
712+ inline void CompilerScratch::csb_repeat::activate () noexcept
713713{
714714 csb_flags |= csb_active;
715715}
716716
717- inline void CompilerScratch::csb_repeat::deactivate ()
717+ inline void CompilerScratch::csb_repeat::deactivate () noexcept
718718{
719719 csb_flags &= ~csb_active;
720720}
@@ -756,8 +756,8 @@ class StatusXcp
756756 StatusXcp ();
757757
758758 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 ;
761761 bool success () const ;
762762 SLONG as_gdscode () const ;
763763 SLONG as_sqlcode () const ;
@@ -767,7 +767,7 @@ class StatusXcp
767767};
768768
769769// 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 ;
771771
772772// Array which stores relative pointers to impure areas of invariant nodes
773773typedef Firebird::SortedArray<ULONG> VarInvariantArray;
0 commit comments