diff options
| author | Petr Mrázek | 2012-03-29 20:18:14 +0200 |
|---|---|---|
| committer | Petr Mrázek | 2012-03-29 20:18:14 +0200 |
| commit | 0c2c94fa92f27290fc499f4542179ed9a0f2a7e0 (patch) | |
| tree | 2d3a90c85a077eac451645e7f88121d6ce708ea1 /plugins/autolabor.cpp | |
| parent | 69b1bbe59ea1a3969a2623ba2d32b9455762307a (diff) | |
| download | dfhack-0c2c94fa92f27290fc499f4542179ed9a0f2a7e0.tar.gz dfhack-0c2c94fa92f27290fc499f4542179ed9a0f2a7e0.tar.bz2 dfhack-0c2c94fa92f27290fc499f4542179ed9a0f2a7e0.tar.xz | |
Remove random bad asserts
Diffstat (limited to 'plugins/autolabor.cpp')
| -rw-r--r-- | plugins/autolabor.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/autolabor.cpp b/plugins/autolabor.cpp index eee10e3e..60a574ce 100644 --- a/plugins/autolabor.cpp +++ b/plugins/autolabor.cpp @@ -590,8 +590,10 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out ) if (labor == df::enums::unit_labor::NONE) continue; + /* assert(labor >= 0); assert(labor < ARRAY_COUNT(labor_infos)); + */ if (labor_infos[labor].is_exclusive && dwarfs[dwarf]->status.labors[labor]) dwarf_info[dwarf].mastery_penalty -= 100; @@ -636,8 +638,10 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out ) { int job = dwarfs[dwarf]->job.current_job->job_type; + /* assert(job >= 0); assert(job < ARRAY_COUNT(dwarf_states)); + */ dwarf_info[dwarf].state = dwarf_states[job]; } @@ -656,8 +660,10 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out ) int labor = ENUM_ATTR(job_skill, labor, skill); if (labor != df::enums::unit_labor::NONE) { + /* assert(labor >= 0); assert(labor < ARRAY_COUNT(labor_to_skill)); + */ labor_to_skill[labor] = skill; } @@ -670,8 +676,10 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out ) if (labor == df::enums::unit_labor::NONE) continue; + /* assert(labor >= 0); assert(labor < ARRAY_COUNT(labor_infos)); + */ labors.push_back(labor); } @@ -684,8 +692,10 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out ) { auto labor = *lp; + /* assert(labor >= 0); assert(labor < ARRAY_COUNT(labor_infos)); + */ df::job_skill skill = labor_to_skill[labor]; @@ -864,8 +874,10 @@ DFhackCExport command_result plugin_onupdate ( color_ostream &out ) if (labor == df::enums::unit_labor::NONE) continue; + /* assert(labor >= 0); assert(labor < ARRAY_COUNT(labor_infos)); + */ if (labor_infos[labor].mode != HAULERS) continue; |
