Skip to content

Commit 12f8df8

Browse files
authored
Merge pull request #669 from yakra/unprocessedwpts
No unprocessed .wpt files
2 parents 8b81d7f + 166bb64 commit 12f8df8

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

siteupdate/cplusplus/siteupdate.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,18 @@ int main(int argc, char *argv[])
101101
all_waypoints.sort();
102102

103103
cout << et.et() << "Finding unprocessed wpt files." << endl;
104+
ofstream unprocessedfile(Args::logfilepath+"/unprocessedwpts.log");
104105
if (Route::all_wpt_files.size())
105-
{ ofstream unprocessedfile(Args::logfilepath+"/unprocessedwpts.log");
106-
cout << Route::all_wpt_files.size() << " .wpt files in " << Args::datapath << "/data not processed, see unprocessedwpts.log." << endl;
106+
{ cout << Route::all_wpt_files.size() << " .wpt files in " << Args::datapath << "/data not processed, see unprocessedwpts.log." << endl;
107107
list<string> all_wpts_list(Route::all_wpt_files.begin(), Route::all_wpt_files.end());
108108
all_wpts_list.sort();
109109
for (const string &f : all_wpts_list) unprocessedfile << strstr(f.data(), "data") << '\n';
110-
unprocessedfile.close();
111110
Route::all_wpt_files.clear();
112-
}
113-
else cout << "All .wpt files in " << Args::datapath << "/data processed." << endl;
111+
}
112+
else { cout << "All .wpt files in " << Args::datapath << "/data processed." << endl;
113+
unprocessedfile << "No unprocessed .wpt files.\n";
114+
}
115+
unprocessedfile.close();
114116

115117
#ifdef threading_enabled
116118
cout << et.et() << "Searching for near-miss points." << endl;

0 commit comments

Comments
 (0)