From 25e693cc46324b4ec588530de542bba8af6f47c6 Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 31 Jan 2026 21:11:11 +0100 Subject: 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. --- tools/asset_packer.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'tools/asset_packer.cc') diff --git a/tools/asset_packer.cc b/tools/asset_packer.cc index 6e939cf..4a2e631 100644 --- a/tools/asset_packer.cc +++ b/tools/asset_packer.cc @@ -59,20 +59,17 @@ int main(int argc, char *argv[]) { std::vector asset_names; while (std::getline(assets_txt_file, line)) { - if (line.empty() || line[0] == '#') - continue; + if (line.empty() || line[0] == '#') continue; size_t first_comma = line.find(','); - if (first_comma == std::string::npos) - continue; + if (first_comma == std::string::npos) continue; std::string asset_name = line.substr(0, first_comma); asset_name.erase(0, asset_name.find_first_not_of(" \t\r\n")); asset_name.erase(asset_name.find_last_not_of(" \t\r\n") + 1); size_t second_comma = line.find(',', first_comma + 1); - if (second_comma == std::string::npos) - continue; + if (second_comma == std::string::npos) continue; std::string filename = line.substr(first_comma + 1, second_comma - first_comma - 1); @@ -102,8 +99,7 @@ int main(int argc, char *argv[]) { assets_data_cc_file << "static const uint8_t ASSET_DATA_" << asset_name << "[] = {"; for (size_t i = 0; i < buffer.size(); ++i) { - if (i % 12 == 0) - assets_data_cc_file << "\n "; + if (i % 12 == 0) assets_data_cc_file << "\n "; assets_data_cc_file << "0x" << std::hex << (int)buffer[i] << std::dec << (i == buffer.size() - 1 ? "" : ", "); } -- cgit v1.2.3