Skip to content

Commit 3f0c424

Browse files
committed
Constexpr in gds_proto + fix mismatch in parameter decl
1 parent f364b12 commit 3f0c424

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

src/yvalve/gds_proto.h

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,23 @@
2020
* All Rights Reserved.
2121
* Contributor(s): ______________________________________.
2222
*
23-
* 2002.10.29 Sean Leyne - Removed obsolete "Netware" port
24-
*
2523
*/
2624

2725
#ifndef JRD_GDS_PROTO_H
2826
#define JRD_GDS_PROTO_H
2927

3028

31-
const SSHORT IB_PREFIX_TYPE = 0;
32-
const SSHORT IB_PREFIX_LOCK_TYPE = 1;
33-
const SSHORT IB_PREFIX_MSG_TYPE = 2;
29+
inline constexpr SSHORT IB_PREFIX_TYPE = 0;
30+
inline constexpr SSHORT IB_PREFIX_LOCK_TYPE = 1;
31+
inline constexpr SSHORT IB_PREFIX_MSG_TYPE = 2;
3432

3533
// flags for gds_alloc_report
36-
const ULONG ALLOC_dont_report = 1L << 0; /* Don't report this block */
37-
const ULONG ALLOC_silent = 1L << 1; /* Don't report new leaks */
38-
const ULONG ALLOC_verbose = 1L << 2; /* Report all leaks, even old */
39-
const ULONG ALLOC_mark_current = 1L << 3; /* Mark all current leaks */
40-
const ULONG ALLOC_check_each_call = 1L << 4; /* Check memory integrity on each alloc/free call */
41-
const ULONG ALLOC_dont_check = 1L << 5; /* Stop checking integrity on each call */
34+
inline constexpr ULONG ALLOC_dont_report = 1L << 0; /* Don't report this block */
35+
inline constexpr ULONG ALLOC_silent = 1L << 1; /* Don't report new leaks */
36+
inline constexpr ULONG ALLOC_verbose = 1L << 2; /* Report all leaks, even old */
37+
inline constexpr ULONG ALLOC_mark_current = 1L << 3; /* Mark all current leaks */
38+
inline constexpr ULONG ALLOC_check_each_call = 1L << 4; /* Check memory integrity on each alloc/free call */
39+
inline constexpr ULONG ALLOC_dont_check = 1L << 5; /* Stop checking integrity on each call */
4240

4341
#ifdef __cplusplus
4442
namespace Firebird
@@ -83,7 +81,7 @@ SLONG API_ROUTINE gds__interprete(char*, ISC_STATUS**);
8381
void API_ROUTINE gds__interprete_a(SCHAR*, SSHORT*, ISC_STATUS*, SSHORT*);
8482

8583
void API_ROUTINE gds__log(const TEXT*, ...);
86-
void API_ROUTINE gds__trace(const char*);
84+
void API_ROUTINE gds__trace(const TEXT*);
8785
void API_ROUTINE gds__trace_raw(const char*, unsigned int = 0);
8886
void API_ROUTINE gds__log_status(const TEXT*, const ISC_STATUS*);
8987
int API_ROUTINE gds__msg_close(void*);

0 commit comments

Comments
 (0)