We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35c1e44 commit f20fa7aCopy full SHA for f20fa7a
1 file changed
OREData/ored/report/csvreport.cpp
@@ -66,6 +66,8 @@ class ReportTypePrinter : public boost::static_visitor<> {
66
fprintString(s);
67
}
68
69
+ void updateFile(FILE* fp) { fp_ = fp; }
70
+
71
private:
72
void fprintNull() const { fprintf(fp_, "%s", null_.c_str()); }
73
@@ -105,10 +107,12 @@ void CSVFileReport::open() {
105
107
LOG("Opening CSV file report '" << filename_ << "'");
106
108
fp_ = FileIO::fopen(filename_.c_str(), "w");
109
QL_REQUIRE(fp_, "Error opening file '" << filename_ << "'");
110
+ for (auto& p : printers_)
111
+ p.updateFile(fp_);
112
finalized_ = false;
113
114
-void CSVFileReport::rollover() {
115
+void CSVFileReport::rollover() {
116
checkIsOpen("rollover()");
117
end();
118
version_++;
0 commit comments