diff options
author | Jack Lloyd <[email protected]> | 2017-12-30 14:11:46 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-12-30 14:11:46 -0500 |
commit | 2d3cee8b02a1823ef05eedbbd3e435131460635a (patch) | |
tree | 0f99b47571fa5cec81a97f32bb3370b958758cc5 | |
parent | cd6e777c32333248329edc3312408aa6eecae512 (diff) |
Remove BOTAN_FORCE_SEMICOLON macro
Only needed in two headers (cli.h and test.h) not in the main library.
Just change those two uses to not use anonymous namespaces.
-rw-r--r-- | src/build-data/buildh.in | 4 | ||||
-rw-r--r-- | src/cli/cli.h | 7 | ||||
-rw-r--r-- | src/tests/tests.h | 3 |
3 files changed, 4 insertions, 10 deletions
diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in index cacc01ed0..d4972af15 100644 --- a/src/build-data/buildh.in +++ b/src/build-data/buildh.in @@ -239,10 +239,6 @@ Each read generates 32 bits of output #endif -// Append to macros living outside of functions, so that invocations must end with a semicolon. -// The struct is only declared to force the semicolon, it is never defined. -#define BOTAN_FORCE_SEMICOLON struct BOTAN_DUMMY_STRUCT - // Check for a common build problem: #if defined(BOTAN_TARGET_ARCH_IS_X86_64) && ((defined(_MSC_VER) && !defined(_WIN64)) || \ diff --git a/src/cli/cli.h b/src/cli/cli.h index d096617a3..118d61cb6 100644 --- a/src/cli/cli.h +++ b/src/cli/cli.h @@ -185,10 +185,9 @@ class Command }; }; -#define BOTAN_REGISTER_COMMAND(name, CLI_Class) \ - namespace { Botan_CLI::Command::Registration \ - reg_cmd_ ## CLI_Class(name, []() -> Botan_CLI::Command* { return new CLI_Class; }); } \ - BOTAN_FORCE_SEMICOLON +#define BOTAN_REGISTER_COMMAND(name, CLI_Class) \ + Botan_CLI::Command::Registration reg_cmd_ ## CLI_Class(name, \ + []() -> Botan_CLI::Command* { return new CLI_Class; }) } diff --git a/src/tests/tests.h b/src/tests/tests.h index 193f7e06d..36a6d4862 100644 --- a/src/tests/tests.h +++ b/src/tests/tests.h @@ -432,8 +432,7 @@ class Test * Register the test with the runner */ #define BOTAN_REGISTER_TEST(type, Test_Class) \ - namespace { Test::Registration reg_ ## Test_Class ## _tests(type, new Test_Class); } \ - BOTAN_FORCE_SEMICOLON + Test::Registration reg_ ## Test_Class ## _tests(type, new Test_Class) /* * A test based on reading an input file which contains key/value pairs |