@@ -71,77 +71,83 @@ namespace Jrd
7171 }
7272
7373 public:
74- static const USHORT FLAG_SCANNED = 1 ; // Field expressions scanned
75- static const USHORT FLAG_OBSOLETE = 2 ; // Procedure known gonzo
76- static const USHORT FLAG_BEING_SCANNED = 4 ; // New procedure needs dependencies during scan
77- static const USHORT FLAG_BEING_ALTERED = 8 ; // Procedure is getting altered
74+ static constexpr USHORT FLAG_SCANNED = 1 ; // Field expressions scanned
75+ static constexpr USHORT FLAG_OBSOLETE = 2 ; // Procedure known gonzo
76+ static constexpr USHORT FLAG_BEING_SCANNED = 4 ; // New procedure needs dependencies during scan
77+ static constexpr USHORT FLAG_BEING_ALTERED = 8 ; // Procedure is getting altered
7878 // This flag is used to make sure that MET_remove_routine
7979 // does not delete and remove procedure block from cache
8080 // so dfw.epp:modify_procedure() can flip procedure body without
8181 // invalidating procedure pointers from other parts of metadata cache
82- static const USHORT FLAG_CHECK_EXISTENCE = 16 ; // Existence lock released
83- static const USHORT FLAG_RELOAD = 32 ; // Recompile before execution
84- static const USHORT FLAG_CLEARED = 64 ; // Routine cleared but not removed from cache
82+ static constexpr USHORT FLAG_CHECK_EXISTENCE = 16 ; // Existence lock released
83+ static constexpr USHORT FLAG_RELOAD = 32 ; // Recompile before execution
84+ static constexpr USHORT FLAG_CLEARED = 64 ; // Routine cleared but not removed from cache
8585
86- static const USHORT MAX_ALTER_COUNT = 64 ; // Number of times an in-cache routine can be altered
86+ static constexpr USHORT MAX_ALTER_COUNT = 64 ; // Number of times an in-cache routine can be altered
8787
8888 static Firebird::MsgMetadata* createMetadata (
8989 const Firebird::Array<NestConst<Parameter> >& parameters, bool isExtern);
9090 static Format* createFormat (MemoryPool& pool, Firebird::IMessageMetadata* params, bool addEof);
9191
9292 public:
93- USHORT getId () const
93+ USHORT getId () const noexcept
9494 {
9595 fb_assert (!subRoutine);
9696 return id;
9797 }
9898
99- void setId (USHORT value) { id = value; }
99+ void setId (USHORT value) noexcept { id = value; }
100100
101- const QualifiedName& getName () const { return name; }
101+ const QualifiedName& getName () const noexcept { return name; }
102102 void setName (const QualifiedName& value) { name = value; }
103103
104- const QualifiedName& getSecurityName () const { return securityName; }
104+ const QualifiedName& getSecurityName () const noexcept { return securityName; }
105105 void setSecurityName (const QualifiedName& value) { securityName = value; }
106106
107- /* const*/ Statement* getStatement () const { return statement; }
107+ /* const*/ Statement* getStatement () const noexcept { return statement; }
108108 void setStatement (Statement* value);
109109
110- bool isSubRoutine () const { return subRoutine; }
111- void setSubRoutine (bool value) { subRoutine = value; }
110+ bool isSubRoutine () const noexcept { return subRoutine; }
111+ void setSubRoutine (bool value) noexcept { subRoutine = value; }
112112
113- bool isImplemented () const { return implemented; }
114- void setImplemented (bool value) { implemented = value; }
113+ bool isImplemented () const noexcept { return implemented; }
114+ void setImplemented (bool value) noexcept { implemented = value; }
115115
116- bool isDefined () const { return defined ; }
117- void setDefined (bool value) { defined = value; }
116+ bool isDefined () const noexcept { return defined ; }
117+ void setDefined (bool value) noexcept { defined = value; }
118118
119119 void checkReload (thread_db* tdbb);
120120
121- USHORT getDefaultCount () const { return defaultCount; }
122- void setDefaultCount (USHORT value) { defaultCount = value; }
121+ USHORT getDefaultCount () const noexcept { return defaultCount; }
122+ void setDefaultCount (USHORT value) noexcept { defaultCount = value; }
123123
124- const Format* getInputFormat () const { return inputFormat; }
125- void setInputFormat (const Format* value) { inputFormat = value; }
124+ const Format* getInputFormat () const noexcept { return inputFormat; }
125+ void setInputFormat (const Format* value) noexcept { inputFormat = value; }
126126
127- const Format* getOutputFormat () const { return outputFormat; }
128- void setOutputFormat (const Format* value) { outputFormat = value; }
127+ const Format* getOutputFormat () const noexcept { return outputFormat; }
128+ void setOutputFormat (const Format* value) noexcept { outputFormat = value; }
129129
130- const Firebird::Array<NestConst<Parameter> >& getInputFields () const { return inputFields; }
131- Firebird::Array<NestConst<Parameter> >& getInputFields () { return inputFields; }
130+ const Firebird::Array<NestConst<Parameter> >& getInputFields () const noexcept
131+ {
132+ return inputFields;
133+ }
134+ Firebird::Array<NestConst<Parameter> >& getInputFields () noexcept { return inputFields; }
132135
133- const Firebird::Array<NestConst<Parameter> >& getOutputFields () const { return outputFields; }
134- Firebird::Array<NestConst<Parameter> >& getOutputFields () { return outputFields; }
136+ const Firebird::Array<NestConst<Parameter> >& getOutputFields () const noexcept
137+ {
138+ return outputFields;
139+ }
140+ Firebird::Array<NestConst<Parameter> >& getOutputFields () noexcept { return outputFields; }
135141
136- void parseBlr (thread_db* tdbb, CompilerScratch* csb, bid* blob_id, bid* blobDbg);
142+ void parseBlr (thread_db* tdbb, CompilerScratch* csb, const bid* blob_id, bid* blobDbg);
137143 void parseMessages (thread_db* tdbb, CompilerScratch* csb, Firebird::BlrReader blrReader);
138144
139- bool isUsed () const
145+ bool isUsed () const noexcept
140146 {
141147 return useCount != 0 ;
142148 }
143149
144- void addRef ()
150+ void addRef () noexcept
145151 {
146152 ++useCount;
147153 }
@@ -156,8 +162,8 @@ namespace Jrd
156162 virtual void releaseExternal () {};
157163
158164 public:
159- virtual int getObjectType () const = 0;
160- virtual SLONG getSclType () const = 0;
165+ virtual int getObjectType () const noexcept = 0;
166+ virtual SLONG getSclType () const noexcept = 0;
161167 virtual bool checkCache (thread_db* tdbb) const = 0;
162168 virtual void clearCache (thread_db* tdbb) = 0;
163169
0 commit comments