File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,13 @@ using namespace pdal;
4040void VirtualPointCloud::clear ()
4141{
4242 files.clear ();
43+
44+ // remove the temporary local copy of a remote VPC, if one was downloaded
45+ if (!downloadedFilename.empty ()) {
46+ std::error_code ec;
47+ fs::remove (downloadedFilename, ec);
48+ downloadedFilename.clear ();
49+ }
4350}
4451
4552void VirtualPointCloud::dump ()
@@ -994,13 +1001,4 @@ std::vector<VirtualPointCloud::File> VirtualPointCloud::overlappingBox2D(const B
9941001 return overlaps;
9951002}
9961003
997- VirtualPointCloud::~VirtualPointCloud () { cleanup (); }
998-
999- void VirtualPointCloud::cleanup () {
1000- // remove the temporary local copy of a remote VPC, if one was downloaded
1001- if (!downloadedFilename.empty ()) {
1002- std::error_code ec;
1003- fs::remove (downloadedFilename, ec);
1004- downloadedFilename.clear ();
1005- }
1006- }
1004+ VirtualPointCloud::~VirtualPointCloud () { clear (); }
Original file line number Diff line number Diff line change @@ -75,9 +75,6 @@ struct VirtualPointCloud
7575 std::string crsWkt; // valid WKT for CRS of all files (or empty string if undefined, or "_mix_" if a mixture of CRS was seen)
7676 std::string downloadedFilename; // local copy of a remote VPC fetched in read()
7777
78- // ! removes the temporary local copy of a remote VPC, if one was downloaded
79- void cleanup ();
80-
8178 void clear ();
8279 void dump ();
8380 bool read (std::string filename);
You can’t perform that action at this time.
0 commit comments