@@ -67,11 +67,11 @@ DEFINE_TRACE_ROUTINE(dsql_trace);
6767#include " ../dsql/sym.h"
6868
6969// Context aliases used in triggers
70- const char * const OLD_CONTEXT_NAME = " OLD" ;
71- const char * const NEW_CONTEXT_NAME = " NEW" ;
70+ inline constexpr const char * OLD_CONTEXT_NAME = " OLD" ;
71+ inline constexpr const char * NEW_CONTEXT_NAME = " NEW" ;
7272
73- const int OLD_CONTEXT_VALUE = 0 ;
74- const int NEW_CONTEXT_VALUE = 1 ;
73+ inline constexpr int OLD_CONTEXT_VALUE = 0 ;
74+ inline constexpr int NEW_CONTEXT_VALUE = 1 ;
7575
7676namespace Jrd
7777{
@@ -126,11 +126,11 @@ class dsql_dbb : public pool_alloc<dsql_type_dbb>
126126 Firebird::LeftPooledMap<Firebird::string, DsqlDmlRequest*> dbb_cursors; // known cursors in database
127127 Firebird::AutoPtr<DsqlStatementCache> dbb_statement_cache;
128128
129- MemoryPool& dbb_pool; // The current pool for the dbb
130- Attachment* dbb_attachment;
129+ MemoryPool& dbb_pool; // The current pool for the dbb
130+ Attachment* dbb_attachment;
131131 Firebird::FullPooledMap<MetaName, QualifiedName> dbb_schemas_dfl_charset;
132132 QualifiedName dbb_dfl_charset;
133- bool dbb_no_charset;
133+ bool dbb_no_charset = false ;
134134
135135 dsql_dbb (MemoryPool& p, Attachment* attachment);
136136 ~dsql_dbb ();
@@ -156,13 +156,13 @@ class dsql_rel : public pool_alloc<dsql_type_rel>
156156 {
157157 }
158158
159- dsql_fld* rel_fields; // Field block
159+ dsql_fld* rel_fields = nullptr ; // Field block
160160 // dsql_rel* rel_base_relation; // base relation for an updatable view
161- QualifiedName rel_name; // Name of relation
161+ QualifiedName rel_name; // Name of relation
162162 MetaName rel_owner; // Owner of relation
163- USHORT rel_id; // Relation id
164- USHORT rel_dbkey_length;
165- USHORT rel_flags;
163+ USHORT rel_id = 0 ; // Relation id
164+ USHORT rel_dbkey_length = 0 ;
165+ USHORT rel_flags = 0 ;
166166};
167167
168168// rel_flags bits
@@ -542,16 +542,16 @@ class dsql_ctx : public pool_alloc<dsql_type_ctx>
542542
543543// Flag values for ctx_flags
544544
545- const USHORT CTX_outer_join = 0x01 ; // reference is part of an outer join
546- const USHORT CTX_system = 0x02 ; // Context generated by system (NEW/OLD in triggers, check-constraint, RETURNING)
547- const USHORT CTX_null = 0x04 ; // Fields of the context should be resolved to NULL constant
548- const USHORT CTX_returning = 0x08 ; // Context generated by RETURNING
549- const USHORT CTX_recursive = 0x10 ; // Context has secondary number (ctx_recursive) generated for recursive UNION
550- const USHORT CTX_view_with_check_store = 0x20 ; // Context of WITH CHECK OPTION view's store trigger
551- const USHORT CTX_view_with_check_modify = 0x40 ; // Context of WITH CHECK OPTION view's modify trigger
552- const USHORT CTX_cursor = 0x80 ; // Context is a cursor
553- const USHORT CTX_lateral = 0x100 ; // Context is a lateral derived table
554- const USHORT CTX_blr_fields = 0x200 ; // Fields of the context are defined inside BLR
545+ inline constexpr USHORT CTX_outer_join = 0x01 ; // reference is part of an outer join
546+ inline constexpr USHORT CTX_system = 0x02 ; // Context generated by system (NEW/OLD in triggers, check-constraint, RETURNING)
547+ inline constexpr USHORT CTX_null = 0x04 ; // Fields of the context should be resolved to NULL constant
548+ inline constexpr USHORT CTX_returning = 0x08 ; // Context generated by RETURNING
549+ inline constexpr USHORT CTX_recursive = 0x10 ; // Context has secondary number (ctx_recursive) generated for recursive UNION
550+ inline constexpr USHORT CTX_view_with_check_store = 0x20 ; // Context of WITH CHECK OPTION view's store trigger
551+ inline constexpr USHORT CTX_view_with_check_modify = 0x40 ; // Context of WITH CHECK OPTION view's modify trigger
552+ inline constexpr USHORT CTX_cursor = 0x80 ; // Context is a cursor
553+ inline constexpr USHORT CTX_lateral = 0x100 ; // Context is a lateral derived table
554+ inline constexpr USHORT CTX_blr_fields = 0x200 ; // Fields of the context are defined inside BLR
555555
556556// ! Aggregate/union map block to map virtual fields to their base
557557// ! TMN: NOTE! This datatype should definitely be renamed!
@@ -652,7 +652,7 @@ class IntlString
652652
653653 Firebird::string toUtf8 (jrd_tra* transaction) const ;
654654
655- const QualifiedName& getCharSet () const
655+ const QualifiedName& getCharSet () const noexcept
656656 {
657657 return charset;
658658 }
@@ -662,7 +662,7 @@ class IntlString
662662 charset = value;
663663 }
664664
665- const Firebird::string& getString () const
665+ const Firebird::string& getString () const noexcept
666666 {
667667 return s;
668668 }
@@ -690,7 +690,7 @@ class Lim64String : public Firebird::string
690690 scale (sc)
691691 { }
692692
693- int getScale ()
693+ int getScale () noexcept
694694 {
695695 return scale;
696696 }
@@ -782,7 +782,7 @@ struct SignatureParameter
782782 std::optional<SSHORT> fieldCharSetId;
783783 std::optional<SSHORT> fieldPrecision;
784784
785- bool operator >(const SignatureParameter& o) const
785+ bool operator >(const SignatureParameter& o) const noexcept
786786 {
787787 return type > o.type || (type == o.type && number > o.number );
788788 }
0 commit comments