Skip to content

Commit 24397f8

Browse files
committed
ais.h: Fix cppcoreguidelines-macro-usage for VERSION macros
1 parent 0bb60ac commit 24397f8

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/libais/ais.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44

55
#include "ais.h"
66

7-
extern "C" {
87
int LibAisVersionMajor() {
98
return LIBAIS_VERSION_MAJOR;
109
}
1110

1211
int LibAisVersionMinor() {
1312
return LIBAIS_VERSION_MINOR;
1413
}
15-
} // extern "C"
1614

1715
namespace libais {
1816

src/libais/ais.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,12 @@ using std::string;
2222
using std::unique_ptr;
2323
using std::vector;
2424

25-
#define LIBAIS_VERSION_MAJOR 0
26-
#define LIBAIS_VERSION_MINOR 17
25+
constexpr int LIBAIS_VERSION_MAJOR = 0;
26+
constexpr int LIBAIS_VERSION_MINOR = 17;
2727

28-
extern "C" {
2928
// For configuration scripts to detect libais and the version numbers.
3029
int LibAisVersionMajor();
3130
int LibAisVersionMinor();
32-
}
3331

3432
namespace libais {
3533

0 commit comments

Comments
 (0)