Skip to content

Commit 5e13da3

Browse files
committed
Added newline at end of symbols namespace and made data contract methods
inline
1 parent b07d2e2 commit 5e13da3

2 files changed

Lines changed: 41 additions & 3 deletions

File tree

glean.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"provides": "json_to_cpp",
3+
"build_type": "cmake",
4+
"dependencies": [
5+
{
6+
"provides": "header_libraries",
7+
"download_type": "git",
8+
"build_type": "cmake",
9+
"uri": "https://github.com/beached/header_libraries.git"
10+
},
11+
{
12+
"provides": "parse_json",
13+
"download_type": "git",
14+
"build_type": "cmake",
15+
"uri": "https://github.com/beached/parse_json.git"
16+
},
17+
{
18+
"provides": "utf_range",
19+
"download_type": "git",
20+
"build_type": "cmake",
21+
"uri": "https://github.com/beached/utf_range.git"
22+
},
23+
{
24+
"provides": "date",
25+
"download_type": "git",
26+
"build_type": "cmake",
27+
"uri": "https://github.com/howardhinnant/date.git",
28+
"cmake_args": [ "-DUSE_SYSTEM_TZ_DB=true" ]
29+
},
30+
{
31+
"provides": "temp_file",
32+
"download_type": "git",
33+
"build_type": "cmake",
34+
"uri": "https://github.com/beached/libtemp_file.git"
35+
}
36+
]
37+
}
38+

src/json_to_cpp.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,8 @@ namespace daw::json_to_cpp {
373373
config.cpp_file( ) << child.first << "\";\n";
374374
}
375375
}
376-
config.cpp_file( ) << "}\n";
377-
config.cpp_file( ) << "auto describe_json_class( "
376+
config.cpp_file( ) << "}\n\n";
377+
config.cpp_file( ) << "inline auto describe_json_class( "
378378
<< cur_obj.object_name
379379
<< " ) {\n\tusing namespace daw::json;\n";
380380

@@ -405,7 +405,7 @@ namespace daw::json_to_cpp {
405405
}
406406
config.cpp_file( ) << "\t>{};\n}\n\n";
407407

408-
config.cpp_file( ) << "auto to_json_data( " << cur_obj.object_name
408+
config.cpp_file( ) << "inline auto to_json_data( " << cur_obj.object_name
409409
<< " const & value ) {\n";
410410
config.cpp_file( ) << "\treturn std::forward_as_tuple( ";
411411
is_first = true;

0 commit comments

Comments
 (0)