Skip to content

Commit 0b1008c

Browse files
committed
Remove useless comments
1 parent dddf2e0 commit 0b1008c

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

cli_main.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
#include <vector>
77
#include <string>
88

9-
// Updated parseCSV to take a multiplier
9+
1010
std::vector<ChatMessage> parseCSV(const std::string &filename, int timeMultiplier) {
1111
std::vector<ChatMessage> messages;
1212
try {
1313
csv::CSVReader reader(filename);
14-
for (auto &row : reader) {
14+
for (auto &row: reader) {
1515
ChatMessage msg;
1616
msg.time = row["time"].get<int>() * timeMultiplier;
1717

@@ -49,33 +49,28 @@ int main(int argc, char *argv[]) {
4949
->check(CLI::ExistingFile);
5050
app.add_option("-o,--output", outputPath, "Output file (e.g. output.srv3 or output.ytt)")
5151
->required();
52-
app.add_option("-u,--time-unit", timeUnit,"Time unit inside CSV: “ms” or “sec”")
53-
->required()
54-
->check(CLI::IsMember({"ms","sec"}, CLI::ignore_case));
52+
app.add_option("-u,--time-unit", timeUnit, "Time unit inside CSV: “ms” or “sec”")
53+
->required()
54+
->check(CLI::IsMember({"ms", "sec"}, CLI::ignore_case));
5555

5656
CLI11_PARSE(app, argc, argv);
5757

58-
// Determine multiplier from timeUnit
5958
int multiplier = (timeUnit == "sec") ? 1000 : 1;
6059

61-
// Load config
6260
ChatParams params;
6361
if (!params.loadFromFile(configPath.c_str())) {
6462
std::cerr << "Error: Cannot open config file: " << configPath << "\n";
6563
return 1;
6664
}
6765

68-
// Parse CSV with correct time multiplier
6966
auto chat = parseCSV(csvPath, multiplier);
7067
if (chat.empty()) {
7168
std::cerr << "Error: Failed to parse chat CSV or it's empty: " << csvPath << "\n";
7269
return 1;
7370
}
7471

75-
// Generate XML
7672
std::string xml = generateXML(chat, params);
7773

78-
// Write to output
7974
std::ofstream out(outputPath);
8075
if (!out) {
8176
std::cerr << "Error: Cannot open output file: " << outputPath << "\n";

0 commit comments

Comments
 (0)