summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dbg-scan.cc
diff options
context:
space:
mode:
authorgammafunk <gammafunk@gmail.com>2014-07-15 05:20:49 -0500
committergammafunk <gammafunk@gmail.com>2014-07-15 06:02:35 -0500
commitcf67ce18954911519e6539c818a3190f1c711f08 (patch)
tree96335e860cc2f4b944f13231d3212ce7f6b546ce /crawl-ref/source/dbg-scan.cc
parent11ddf13ad30d7346ec1672fd8f0899e2a273d6ad (diff)
downloadcrawl-ref-cf67ce18954911519e6539c818a3190f1c711f08.tar.gz
crawl-ref-cf67ce18954911519e6539c818a3190f1c711f08.zip
Clean up the failure handling of mapstat and objstat
Diffstat (limited to 'crawl-ref/source/dbg-scan.cc')
-rw-r--r--crawl-ref/source/dbg-scan.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/crawl-ref/source/dbg-scan.cc b/crawl-ref/source/dbg-scan.cc
index bd252359a3..744fb1c69d 100644
--- a/crawl-ref/source/dbg-scan.cc
+++ b/crawl-ref/source/dbg-scan.cc
@@ -1954,7 +1954,7 @@ void objstat_generate_stats()
++num_branches;
}
}
- // We won't ouput AllLevels if only one branch is tallied.
+ // This represents the AllLevels summary.
stat_branches[NUM_BRANCHES] = vector<level_id>();
stat_branches[NUM_BRANCHES].push_back(level_id(NUM_BRANCHES, -1));
fprintf(stdout, "Generating object statistics for %d iteration(s) of %d "
@@ -1964,8 +1964,7 @@ void objstat_generate_stats()
_init_foods();
_init_monsters();
_init_stats();
- mapstat_build_levels(SysEnv.map_gen_iters);
- _write_object_stats();
+ if (mapstat_build_levels())
+ _write_object_stats();
}
-
#endif // DEBUG_DIAGNOSTICS