Skip to content

Commit 2599816

Browse files
committed
Replace std::println with std::cout for output formatting in Sparser
1 parent a54fd8b commit 2599816

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/sparser/sparser.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include <iostream>
99
#include <limits>
1010
#include <memory>
11-
#include <print>
1211
#include <string>
1312
#include <string_view>
1413
#include <vector>
@@ -122,8 +121,8 @@ void Sparser::Run(const std::string& input_path, const JsonQuery& json_query) {
122121
PrettyPrint(best_cascade, rf_data);
123122
std::cout << "Best cascade cost: " << min_cost << "\n\n";
124123

125-
std::println("Sparser:\t\x1b[1;33mResult: {} (Execution Time: {:f} seconds)\x1b[0m", stats.records_matched,
126-
sparser_time);
124+
std::cout << "Sparser:\t\x1b[1;33mResult: " << stats.records_matched << " (Execution Time: " << sparser_time
125+
<< " seconds)\x1b[0m" << '\n';
127126

128127
stats.PrintStats();
129128

@@ -133,8 +132,8 @@ void Sparser::Run(const std::string& input_path, const JsonQuery& json_query) {
133132
auto naive_stats = SearchNaive(naive_input, json_query);
134133
auto naive_time = benchmark_stop(naive_time_start);
135134

136-
std::println("Naive:\t\x1b[1;33mResult: {} (Execution Time: {:f} seconds)\x1b[0m", naive_stats.callback_passed,
137-
naive_time);
135+
std::cout << "Naive:\t\x1b[1;33mResult: " << naive_stats.callback_passed << " (Execution Time: " << naive_time
136+
<< " seconds)\x1b[0m" << '\n';
138137
}
139138

140139
SparserSearchStats Sparser::SearchCascade(const std::vector<std::string_view>& input, const JsonQuery& json_query,

0 commit comments

Comments
 (0)