From 53a8032f8af30ae668bcf27e44474b7e6667180d Mon Sep 17 00:00:00 2001 From: expwnent Date: Fri, 16 Jan 2015 03:27:14 -0500 Subject: [PATCH] Fix compile of blueprint plugin on Linux. --- plugins/blueprint.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/plugins/blueprint.cpp b/plugins/blueprint.cpp index 60cf8dec7..e32d4a20a 100644 --- a/plugins/blueprint.cpp +++ b/plugins/blueprint.cpp @@ -108,7 +108,7 @@ string get_tile_build(uint32_t x, uint32_t y, df::building* b) bool at_se_corner = x == b->x2 && y == b->y2; bool at_center = x == b->centerx && y == b->centery; pair size = get_building_size(b); - stringstream out = stringstream(); + stringstream out;// = stringstream(); switch(b->getType()) { case building_type::Armorstand: @@ -484,7 +484,7 @@ string get_tile_place(uint32_t x, uint32_t y, df::building* b) return "`"; pair size = get_building_size(b); df::building_stockpilest* sp = (df::building_stockpilest*) b; - stringstream out = stringstream(); + stringstream out;// = stringstream(); switch (sp->settings.flags.whole) { case df::stockpile_group_set::mask_animals: @@ -554,22 +554,26 @@ command_result do_transform(DFCoord start, DFCoord end, string name, uint32_t ph ofstream dig, build, place, query; if (phases & QUERY) { - query = ofstream(name + "-query.csv", ofstream::trunc); + //query = ofstream((name + "-query.csv").c_str(), ofstream::trunc); + query.open(name+"-query.csv", ofstream::trunc); query << "#query" << endl; } if (phases & PLACE) { - place = ofstream(name + "-place.csv", ofstream::trunc); + //place = ofstream(name + "-place.csv", ofstream::trunc); + place.open(name+"-place.csv", ofstream::trunc); place << "#place" << endl; } if (phases & BUILD) { - build = ofstream(name + "-build.csv", ofstream::trunc); + //build = ofstream(name + "-build.csv", ofstream::trunc); + build.open(name+"-build.csv", ofstream::trunc); build << "#build" << endl; } if (phases & DIG) { - dig = ofstream(name + "-dig.csv", ofstream::trunc); + //dig = ofstream(name + "-dig.csv", ofstream::trunc); + dig.open(name+"-dig.csv", ofstream::trunc); dig << "#dig" << endl; } if (start.x > end.x) @@ -675,4 +679,4 @@ command_result blueprint(color_ostream &out, vector ¶meters) if (cmd_option_exists(parameters, "query")) option |= QUERY; return do_transform(start, end, parameters[3], option); -} \ No newline at end of file +}