Skip to content

Commit

Permalink
YAML CPP: Specify name prefix only once
Browse files Browse the repository at this point in the history
  • Loading branch information
sanssecours committed Mar 28, 2019
1 parent 37de111 commit 6ac869e
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 12 deletions.
3 changes: 3 additions & 0 deletions src/plugins/yamlcpp/testmod_yamlcpp.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
ksDel (keySet); \
PLUGIN_CLOSE ()

/* We use this prefix in all header files that contain test data. */
#define PREFIX "user/examples/yamlcpp/"

// -- Functions ----------------------------------------------------------------------------------------------------------------------------

static void test_contract (void)
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/yamlcpp/yamlcpp/flat_block_mapping.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// clang-format off

#define PREFIX "user/examples/yamlcpp/"

ksNew (10,
keyNew (PREFIX "longish key", KEY_VALUE, "10-9-8-7 everybody’s coming to burn this city", KEY_END),
keyNew (PREFIX "double quoted", KEY_VALUE, "single quoted", KEY_END),
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/yamlcpp/yamlcpp/flat_flow_mapping.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// clang-format off

#define PREFIX "user/examples/yamlcpp/"

ksNew (10,
keyNew (PREFIX "space invader", KEY_VALUE, "👾", KEY_END),
keyNew (PREFIX "text", KEY_VALUE, "1337", KEY_END),
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/yamlcpp/yamlcpp/nested_block_mapping.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// clang-format off

#define PREFIX "user/examples/yamlcpp/"

ksNew (10,
keyNew (PREFIX "bloc/party/little", KEY_VALUE, "thoughts", KEY_END),
keyNew (PREFIX "bloc/party/silent", KEY_VALUE, "alarm", KEY_END),
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/yamlcpp/yamlcpp/nested_mixed_mapping.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// clang-format off

#define PREFIX "user/examples/yamlcpp/"

ksNew (20,
keyNew (PREFIX "bloc/party/little", KEY_VALUE, "thoughts", KEY_END),
keyNew (PREFIX "bloc/party/silent", KEY_VALUE, "alarm", KEY_END),
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/yamlcpp/yamlcpp/nested_sequences.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// clang-format off

#define PREFIX "user/examples/yamlcpp/"

ksNew (20,
keyNew (PREFIX "American Football", KEY_BINARY, KEY_META, "array", "#2", KEY_END),
keyNew (PREFIX "American Football/#0", KEY_VALUE, "American Football (EP)", KEY_END),
Expand Down
2 changes: 0 additions & 2 deletions src/plugins/yamlcpp/yamlcpp/simple_sequence.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// clang-format off

#define PREFIX "user/examples/yamlcpp/"

ksNew (20,
keyNew (PREFIX "#0", KEY_VALUE, "You,", KEY_END),
keyNew (PREFIX "#1", KEY_VALUE, "Me, &", KEY_END),
Expand Down

0 comments on commit 6ac869e

Please sign in to comment.