Skip to content

Commit e326830

Browse files
committed
constexpr in traceswi
1 parent 96d9100 commit e326830

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/jrd/trace/traceswi.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,25 @@
2626

2727
#include "../../jrd/constants.h"
2828

29-
const int IN_SW_TRACE_START = 1;
30-
const int IN_SW_TRACE_STOP = 2;
31-
const int IN_SW_TRACE_SUSPEND = 3;
32-
const int IN_SW_TRACE_RESUME = 4;
33-
const int IN_SW_TRACE_LIST = 5;
34-
const int IN_SW_TRACE_CONFIG = 6;
35-
const int IN_SW_TRACE_NAME = 7;
36-
const int IN_SW_TRACE_ID = 8;
37-
const int IN_SW_TRACE_USERNAME = 9;
38-
const int IN_SW_TRACE_PASSWORD = 10;
39-
const int IN_SW_TRACE_SERVICE_NAME = 11;
40-
const int IN_SW_TRACE_FETCH_PWD = 12;
41-
const int IN_SW_TRACE_TRUSTED_AUTH = 13;
42-
const int IN_SW_TRACE_VERSION = 14;
43-
const int IN_SW_TRACE_ROLE = 15;
29+
inline constexpr int IN_SW_TRACE_START = 1;
30+
inline constexpr int IN_SW_TRACE_STOP = 2;
31+
inline constexpr int IN_SW_TRACE_SUSPEND = 3;
32+
inline constexpr int IN_SW_TRACE_RESUME = 4;
33+
inline constexpr int IN_SW_TRACE_LIST = 5;
34+
inline constexpr int IN_SW_TRACE_CONFIG = 6;
35+
inline constexpr int IN_SW_TRACE_NAME = 7;
36+
inline constexpr int IN_SW_TRACE_ID = 8;
37+
inline constexpr int IN_SW_TRACE_USERNAME = 9;
38+
inline constexpr int IN_SW_TRACE_PASSWORD = 10;
39+
inline constexpr int IN_SW_TRACE_SERVICE_NAME = 11;
40+
inline constexpr int IN_SW_TRACE_FETCH_PWD = 12;
41+
inline constexpr int IN_SW_TRACE_TRUSTED_AUTH = 13;
42+
inline constexpr int IN_SW_TRACE_VERSION = 14;
43+
inline constexpr int IN_SW_TRACE_ROLE = 15;
4444

4545

4646
// list of possible actions (services) for use with trace services
47-
static const struct Switches::in_sw_tab_t trace_action_in_sw_table [] =
47+
static inline constexpr struct Switches::in_sw_tab_t trace_action_in_sw_table [] =
4848
{
4949
{IN_SW_TRACE_LIST, isc_action_svc_trace_list, "LIST", 0, 0, 0, false, false, 0, 1, NULL},
5050
{IN_SW_TRACE_RESUME, isc_action_svc_trace_resume, "RESUME", 0, 0, 0, false, false, 0, 1, NULL},
@@ -57,7 +57,7 @@ static const struct Switches::in_sw_tab_t trace_action_in_sw_table [] =
5757

5858

5959
// list of actions (services) parameters
60-
static const struct Switches::in_sw_tab_t trace_option_in_sw_table [] =
60+
static inline constexpr struct Switches::in_sw_tab_t trace_option_in_sw_table [] =
6161
{
6262
{IN_SW_TRACE_CONFIG, isc_spb_trc_cfg, "CONFIG", 0, 0, 0, false, false, 0, 1, NULL},
6363
{IN_SW_TRACE_ID, isc_spb_trc_id, "ID", 0, 0, 0, false, false, 0, 1, NULL},
@@ -66,7 +66,7 @@ static const struct Switches::in_sw_tab_t trace_option_in_sw_table [] =
6666
};
6767

6868
// authentication switches, common for all utils (services)
69-
static const struct Switches::in_sw_tab_t trace_auth_in_sw_table [] =
69+
static inline constexpr struct Switches::in_sw_tab_t trace_auth_in_sw_table [] =
7070
{
7171
{IN_SW_TRACE_FETCH_PWD, 0, "FETCH_PASSWORD", 0, 0, 0, false, false, 0, 2, NULL},
7272
{IN_SW_TRACE_PASSWORD, 0, PASSWORD_SWITCH, 0, 0, 0, false, false, 0, 1, NULL},

0 commit comments

Comments
 (0)