Update clang-format config.

This commit is contained in:
tastytea 2020-07-05 11:38:37 +02:00
parent fac9c60eb6
commit 37ddff8c00
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,7 @@ AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: false # TODO: Not sure what I prefer. BinPackArguments: true # TODO: Not sure what I prefer.
BinPackParameters: true # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ BinPackParameters: true # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
BraceWrapping: # If BreakBeforeBraces is set to Custom. BraceWrapping: # If BreakBeforeBraces is set to Custom.
AfterCaseLabel: true AfterCaseLabel: true

View File

@ -26,12 +26,14 @@ namespace FediBlock::json
string to_json(const entry_type &entry) string to_json(const entry_type &entry)
{ {
const string filename{fs::path(entry.screenshot_filepath).filename()}; const string filename{fs::path(entry.screenshot_filepath).filename()};
// clang-format off
const nlohmann::json json{{"instance", entry.instance}, const nlohmann::json json{{"instance", entry.instance},
{"tags", entry.tags}, {"tags", entry.tags},
{"receipts", entry.receipts}, {"receipts", entry.receipts},
{"description", entry.description}, {"description", entry.description},
{"screenshot", filename}, {"screenshot", filename},
{"report_time", entry.report_time}}; {"report_time", entry.report_time}};
// clang-format on
return json.dump(4); return json.dump(4);
} }