diff options
| author | skal <pascal.massimino@gmail.com> | 2026-01-31 21:11:11 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-01-31 21:11:11 +0100 |
| commit | 25e693cc46324b4ec588530de542bba8af6f47c6 (patch) | |
| tree | 8a959e442f9330dd3f881fe4109e83b831f25a7e /tools/seq_compiler.cc | |
| parent | 9379697ccdf6f44ade7933d5635f72f644f6b92e (diff) | |
style: add vertical compression rules to clang-format
- Enabled AllowShortFunctionsOnASingleLine: All
- Enabled AllowShortBlocksOnASingleLine: Always
- Enabled AllowShortIfStatementsOnASingleLine: Always
- Enabled AllowShortLoopsOnASingleLine: true
- Set MaxEmptyLinesToKeep: 1
- Applied formatting to all source files.
Diffstat (limited to 'tools/seq_compiler.cc')
| -rw-r--r-- | tools/seq_compiler.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tools/seq_compiler.cc b/tools/seq_compiler.cc index 4846244..e84877b 100644 --- a/tools/seq_compiler.cc +++ b/tools/seq_compiler.cc @@ -24,8 +24,7 @@ struct SequenceEntry { std::string trim(const std::string &str) { size_t first = str.find_first_not_of(" "); - if (std::string::npos == first) - return str; + if (std::string::npos == first) return str; size_t last = str.find_last_not_of(" "); return str.substr(first, (last - first + 1)); } @@ -52,8 +51,7 @@ int main(int argc, char *argv[]) { while (std::getline(in_file, line)) { line_num++; std::string trimmed = trim(line); - if (trimmed.empty() || trimmed[0] == '#') - continue; + if (trimmed.empty() || trimmed[0] == '#') continue; std::stringstream ss(trimmed); std::string command; @@ -87,9 +85,7 @@ int main(int argc, char *argv[]) { // Remove leading whitespace from getline if any (getline reads the space // after priority) extra_args = trim(extra_args); - if (!extra_args.empty()) { - extra_args = ", " + extra_args; - } + if (!extra_args.empty()) { extra_args = ", " + extra_args; } current_seq->effects.push_back( {class_name, start, end, priority, extra_args}); |
