Skip to content

Commit e0c978f

Browse files
committed
Simplify
1 parent a64b023 commit e0c978f

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ endif
1818

1919
# Source files
2020
SOURCES = src/sensor-data.cpp
21-
LIB_SOURCES = src/csv_parser.cpp src/json_parser.cpp src/error_detector.cpp src/file_utils.cpp src/sensor_data_transformer.cpp src/data_counter.cpp src/error_lister.cpp src/error_summarizer.cpp src/stats_analyser.cpp src/latest_finder.cpp src/data_reader.cpp
21+
LIB_SOURCES = src/csv_parser.cpp src/json_parser.cpp src/error_detector.cpp src/file_utils.cpp src/sensor_data_transformer.cpp src/data_counter.cpp src/error_lister.cpp src/error_summarizer.cpp src/stats_analyser.cpp src/latest_finder.cpp
2222
TEST_SOURCES = tests/test_csv_parser.cpp tests/test_json_parser.cpp tests/test_error_detector.cpp tests/test_file_utils.cpp tests/test_date_utils.cpp tests/test_common_arg_parser.cpp tests/test_data_reader.cpp tests/test_file_collector.cpp tests/test_command_base.cpp tests/test_stats_analyser.cpp
2323

2424
# Object files

include/data_reader.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#include <string>
88
#include <vector>
99
#include <map>
10-
#include <mutex>
1110
#include "date_utils.h"
1211
#include "csv_parser.h"
1312
#include "json_parser.h"
@@ -16,7 +15,6 @@
1615
// Centralized data reader that handles file/stdin, CSV/JSON, and date filtering
1716
class DataReader {
1817
private:
19-
static std::mutex outputMutex; // Static mutex for thread-safe console output
2018
long long minDate;
2119
long long maxDate;
2220
int verbosity;
@@ -88,7 +86,6 @@ class DataReader {
8886
template<typename Callback>
8987
void processStdin(Callback callback) {
9088
if (verbosity >= 1) {
91-
std::lock_guard<std::mutex> lock(outputMutex);
9289
std::cerr << "Reading from stdin (format: " << inputFormat << ")..." << std::endl;
9390
}
9491
// For stdin: "csv" means CSV, anything else (including "auto" and "json") means JSON
@@ -99,7 +96,6 @@ class DataReader {
9996
template<typename Callback>
10097
void processFile(const std::string& filename, Callback callback) {
10198
if (verbosity >= 1) {
102-
std::lock_guard<std::mutex> lock(outputMutex);
10399
std::cout << "Processing file: " << filename << std::endl;
104100
if (tailLines > 0) {
105101
std::cout << " (reading last " << tailLines << " lines only)" << std::endl;
@@ -178,7 +174,6 @@ class DataReader {
178174
} else {
179175
std::ifstream infile(filename);
180176
if (!infile) {
181-
std::lock_guard<std::mutex> lock(outputMutex);
182177
return;
183178
}
184179

src/data_reader.cpp

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)