df::dfhack_material_category has no constructor, must be manually initialized

see #1047
develop
Kelly Kinkade 2016-12-18 17:57:23 -06:00
parent ba48afe908
commit 3c7d2626e2
2 changed files with 6 additions and 2 deletions

@ -114,7 +114,9 @@ struct ItemFilter
bool decorated_only; bool decorated_only;
ItemFilter() : min_quality(df::item_quality::Ordinary), decorated_only(false), valid(true) ItemFilter() : min_quality(df::item_quality::Ordinary), decorated_only(false), valid(true)
{ } {
clear(); // mat_mask is not cleared by default (see issue #1047)
}
bool matchesMask(DFHack::MaterialInfo &mat); bool matchesMask(DFHack::MaterialInfo &mat);

@ -357,7 +357,9 @@ public:
: is_craft(false), min_quality(item_quality::Ordinary), is_local(false), : is_craft(false), min_quality(item_quality::Ordinary), is_local(false),
weight(0), item_amount(0), item_count(0), item_inuse_amount(0), item_inuse_count(0), weight(0), item_amount(0), item_count(0), item_inuse_amount(0), item_inuse_count(0),
is_active(false), cant_resume_reported(false), low_stock_reported(-1) is_active(false), cant_resume_reported(false), low_stock_reported(-1)
{} {
mat_mask.whole = 0; // see https://github.com/DFHack/dfhack/issues/1047
}
int goalCount() { return config.ival(0); } int goalCount() { return config.ival(0); }
void setGoalCount(int v) { config.ival(0) = v; } void setGoalCount(int v) { config.ival(0) = v; }