Skip to content

Commit 5f654e7

Browse files
committed
constexpr in TraceCmdLine
1 parent 4f8c297 commit 5f654e7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/jrd/trace/TraceCmdLine.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ namespace
4545
using namespace Firebird;
4646

4747
using MsgFormat::SafeArg;
48-
const USHORT TRACEMGR_MSG_FAC = 25;
48+
constexpr USHORT TRACEMGR_MSG_FAC = FB_IMPL_MSG_FACILITY_FBTRACEMGR;
4949

5050
void printMsg(USHORT number, const SafeArg& arg, bool newLine = true)
5151
{
@@ -63,7 +63,7 @@ namespace
6363
printMsg(number, dummy, newLine);
6464
}
6565

66-
void usage(UtilSvc* uSvc, const ISC_STATUS code, const char* msg1 = NULL, const char* msg2 = NULL)
66+
[[noreturn]] void usage(UtilSvc* uSvc, const ISC_STATUS code, const char* msg1 = NULL, const char* msg2 = NULL)
6767
{
6868
if (uSvc->isService())
6969
{
@@ -80,7 +80,7 @@ namespace
8080
{
8181
printMsg(2, false); // ERROR:
8282
USHORT dummy;
83-
USHORT number = (USHORT) gds__decode(code, &dummy, &dummy);
83+
const USHORT number = (USHORT) gds__decode(code, &dummy, &dummy);
8484
fb_assert(number);
8585
SafeArg safe;
8686
if (msg1)
@@ -94,9 +94,9 @@ namespace
9494

9595
// If the items aren't contiguous, a scheme like in nbackup.cpp will have to be used.
9696
// ASF: This is message codes!
97-
const int MAIN_USAGE[] = {3, 21};
98-
const int EXAMPLES[] = {22, 27};
99-
const int NOTES[] = {28, 29};
97+
constexpr int MAIN_USAGE[] = {3, 21};
98+
constexpr int EXAMPLES[] = {22, 27};
99+
constexpr int NOTES[] = {28, 29};
100100

101101
for (int i = MAIN_USAGE[0]; i <= MAIN_USAGE[1]; ++i)
102102
printMsg(i);

0 commit comments

Comments
 (0)