@@ -42,23 +42,23 @@ namespace computed_function {
4242
4343// A regex function that caches its parsed regex objects.
4444#define REGEX_FUNCTION_HEADER (NAME ) \
45- struct NAME : public exprtk ::igeneric_function<t_tscalar> { \
45+ struct NAME final : public exprtk::igeneric_function<t_tscalar> { \
4646 NAME (t_regex_mapping& regex_mapping); \
4747 ~NAME (); \
48- t_tscalar operator ()(t_parameter_list parameters); \
48+ t_tscalar operator ()(t_parameter_list parameters) override ; \
4949 t_regex_mapping& m_regex_mapping; \
5050 };
5151
5252// A regex function that returns a string stored in the expression vocab.
5353#define REGEX_STRING_FUNCTION_HEADER (NAME ) \
54- struct NAME : public exprtk ::igeneric_function<t_tscalar> { \
54+ struct NAME final : public exprtk::igeneric_function<t_tscalar> { \
5555 NAME ( \
5656 t_expression_vocab& expression_vocab, \
5757 t_regex_mapping& regex_mapping, \
5858 bool is_type_validator \
5959 ); \
6060 ~NAME (); \
61- t_tscalar operator ()(t_parameter_list parameters); \
61+ t_tscalar operator ()(t_parameter_list parameters) override ; \
6262 t_expression_vocab& m_expression_vocab; \
6363 t_regex_mapping& m_regex_mapping; \
6464 bool m_is_type_validator; \
@@ -74,10 +74,10 @@ namespace computed_function {
7474// get_dtype, and because the gnode is guaranteed to be valid for all of
7575// those invocations, we can store a reference to the vocab.
7676#define STRING_FUNCTION_HEADER (NAME ) \
77- struct NAME : public exprtk ::igeneric_function<t_tscalar> { \
77+ struct NAME final : public exprtk::igeneric_function<t_tscalar> { \
7878 NAME (t_expression_vocab& expression_vocab, bool is_type_validator); \
7979 ~NAME (); \
80- t_tscalar operator ()(t_parameter_list parameters); \
80+ t_tscalar operator ()(t_parameter_list parameters) override ; \
8181 t_expression_vocab& m_expression_vocab; \
8282 t_tscalar m_sentinel; \
8383 bool m_is_type_validator; \
@@ -111,11 +111,11 @@ namespace computed_function {
111111 * Strings in the column not provided to `order()` will by default appear at
112112 * the end.
113113 */
114- struct order : public exprtk ::igeneric_function<t_tscalar> {
114+ struct order final : public exprtk::igeneric_function<t_tscalar> {
115115 order (bool is_type_validator);
116116 ~order ();
117117
118- t_tscalar operator ()(t_parameter_list parameters);
118+ t_tscalar operator ()(t_parameter_list parameters) override ;
119119 void clear_order_map ();
120120
121121 tsl::hopscotch_map<std::string, double > m_order_map;
@@ -179,37 +179,37 @@ namespace computed_function {
179179 REGEX_STRING_FUNCTION_HEADER (replace_all)
180180
181181#define FUNCTION_HEADER (NAME ) \
182- struct NAME : public exprtk ::igeneric_function<t_tscalar> { \
182+ struct NAME final : public exprtk::igeneric_function<t_tscalar> { \
183183 NAME (); \
184184 ~NAME (); \
185- t_tscalar operator ()(t_parameter_list parameters); \
185+ t_tscalar operator ()(t_parameter_list parameters) override ; \
186186 };
187187
188188 // Length of the string
189189 FUNCTION_HEADER (length)
190190
191- struct index : public exprtk ::igeneric_function<t_tscalar> {
191+ struct index final : public exprtk::igeneric_function<t_tscalar> {
192192 index (
193193 const t_pkey_mapping& pkey_map,
194194 std::shared_ptr<t_data_table> source_table,
195195 t_uindex& row_idx
196196 );
197197 ~index ();
198- t_tscalar operator ()(t_parameter_list parameters);
198+ t_tscalar operator ()(t_parameter_list parameters) override ;
199199
200200 private:
201201 const t_pkey_mapping& m_pkey_map;
202202 std::shared_ptr<t_data_table> m_source_table;
203203 t_uindex& m_row_idx;
204204 };
205205
206- struct col : public exprtk ::igeneric_function<t_tscalar> {
206+ struct col final : public exprtk::igeneric_function<t_tscalar> {
207207 col (t_expression_vocab& expression_vocab,
208208 bool is_type_validator,
209209 std::shared_ptr<t_data_table> source_table,
210210 t_uindex& row_idx);
211211 ~col ();
212- t_tscalar operator ()(t_parameter_list parameters);
212+ t_tscalar operator ()(t_parameter_list parameters) override ;
213213
214214 private:
215215 t_expression_vocab& m_expression_vocab;
@@ -218,15 +218,15 @@ namespace computed_function {
218218 t_uindex& m_row_idx;
219219 };
220220
221- struct vlookup : public exprtk ::igeneric_function<t_tscalar> {
221+ struct vlookup final : public exprtk::igeneric_function<t_tscalar> {
222222 vlookup (
223223 t_expression_vocab& expression_vocab,
224224 bool is_type_validator,
225225 std::shared_ptr<t_data_table> source_table,
226226 t_uindex& row_idx
227227 );
228228 ~vlookup ();
229- t_tscalar operator ()(t_parameter_list parameters);
229+ t_tscalar operator ()(t_parameter_list parameters) override ;
230230
231231 private:
232232 t_expression_vocab& m_expression_vocab;
@@ -272,11 +272,11 @@ namespace computed_function {
272272 *
273273 * Any other inputs are invalid.
274274 */
275- struct bucket : public exprtk ::igeneric_function<t_tscalar> {
275+ struct bucket final : public exprtk::igeneric_function<t_tscalar> {
276276 bucket ();
277277 ~bucket ();
278278
279- t_tscalar operator ()(t_parameter_list parameters);
279+ t_tscalar operator ()(t_parameter_list parameters) final ;
280280
281281 // faster unit lookups, since we are calling this lookup in a tight
282282 // loop.
0 commit comments