summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dbg-scan.cc
diff options
context:
space:
mode:
authorgammafunk <gammafunk@gmail.com>2014-06-26 04:53:59 -0500
committergammafunk <gammafunk@gmail.com>2014-06-26 05:51:12 -0500
commit8d4f0ef980dcbef12f53137d11df3fe11ce316f2 (patch)
treed522ef2d1b7df14770abb901b64ed6ffef5c6424 /crawl-ref/source/dbg-scan.cc
parent804a95838b948d818a2d2d49d47c8f1e52f246ee (diff)
downloadcrawl-ref-8d4f0ef980dcbef12f53137d11df3fe11ce316f2.tar.gz
crawl-ref-8d4f0ef980dcbef12f53137d11df3fe11ce316f2.zip
Clean up objstat value formatting
Use a fixed decimal point istead of scientific notation, and reduce precision to 2.
Diffstat (limited to 'crawl-ref/source/dbg-scan.cc')
-rw-r--r--crawl-ref/source/dbg-scan.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/dbg-scan.cc b/crawl-ref/source/dbg-scan.cc
index fd2ea78a7a..be73c10d1b 100644
--- a/crawl-ref/source/dbg-scan.cc
+++ b/crawl-ref/source/dbg-scan.cc
@@ -740,7 +740,7 @@ void check_map_validity()
static FILE *stat_outf;
const static char *stat_out_prefix = "objstat_";
const static char *stat_out_ext = ".txt";
-#define STAT_PRECISION 3
+#define STAT_PRECISION 2
enum item_base_type {
ITEM_FOOD,
@@ -1482,6 +1482,7 @@ static void _write_stat(map<string, double> &stats, string field)
double value = 0;
output.precision(STAT_PRECISION);
+ output.setf(ios_base::fixed);
if (field == "PileQuant")
value = stats["Num"] / stats["NumPiles"];
else if (field == "WandCharges"