From 063b669f6b6c0983d0db95048f440051394c07a3 Mon Sep 17 00:00:00 2001 From: Casey Link Date: Sat, 22 Nov 2014 18:57:56 +0100 Subject: [PATCH] stockpiles: cleanup output and add docs --- plugins/stockpiles.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/stockpiles.cpp b/plugins/stockpiles.cpp index 3bdfb3351..0e395b0d7 100644 --- a/plugins/stockpiles.cpp +++ b/plugins/stockpiles.cpp @@ -95,7 +95,9 @@ DFhackCExport command_result plugin_init ( color_ostream &out, std::vector : filename to save stockpile settings to (will be overwritten!)\n" ) @@ -105,7 +107,8 @@ DFhackCExport command_result plugin_init ( color_ostream &out, std::vector : filename to load stockpile settings from\n" ) @@ -2772,11 +2775,10 @@ static command_result savestock ( color_ostream &out, vector & paramete if ( !is_dfstockfile ( file ) ) file += ".dfstock"; if ( !cereal.serialize_to_file ( file ) ) { - out << "serialize failed" << endl; + out.printerr ( "serialize failed\n" ); return CR_FAILURE; } } - out << "save complete." << endl; return CR_OK; } @@ -2821,10 +2823,9 @@ static command_result loadstock ( color_ostream &out, vector & paramete cereal.enable_debug ( out ); if ( !cereal.unserialize_from_file ( file ) ) { - out << "unserialize failed" << endl; + out.printerr ( "unserialization failed\n" ); return CR_FAILURE; } - out << "load complete." << endl; return CR_OK; }