Fix a few compiler warnings
This commit is contained in:
@@ -73,7 +73,7 @@ xHandlerNotSupported::xHandlerNotSupported(eDlogEvt t){
|
||||
this->evt = t;
|
||||
}
|
||||
const char* xHandlerNotSupported::what() const throw() {
|
||||
assert("A handler not supported message is missing!" && evt < 4);
|
||||
assert("A handler not supported message is missing!" && int(evt) < 4);
|
||||
return msg[evt];
|
||||
}
|
||||
|
||||
|
@@ -1257,7 +1257,7 @@ static bool edit_monst_abil_detail(cDialog& me, std::string hit, cMonster& monst
|
||||
});
|
||||
|
||||
if(cat == eMonstAbilCat::MISSILE || cat == eMonstAbilCat::GENERAL || cat == eMonstAbilCat::SUMMON) {
|
||||
int first, last;
|
||||
int first = 0, last = 0;
|
||||
if(cat == eMonstAbilCat::MISSILE) first = 110, last = 119;
|
||||
else if(cat == eMonstAbilCat::GENERAL) first = 120, last = 124;
|
||||
else if(cat == eMonstAbilCat::SUMMON) first = 150, last = 152;
|
||||
@@ -2454,6 +2454,8 @@ static bool add_shop_entry(cDialog& me, std::string type, cShop& shop, size_t wh
|
||||
} else if(type == "heal") {
|
||||
list = STRT_HEALING;
|
||||
prompt = "What kind of healing?";
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
int i = choose_text(list, -1, &me, prompt);
|
||||
if(i == -1) return true;
|
||||
|
@@ -808,7 +808,7 @@ static bool edit_spec_enc_value(cDialog& me, std::string item_hit, node_stack_t&
|
||||
PIC_FULL
|
||||
};
|
||||
std::string field = item_hit.substr(0, item_hit.find_first_of('-'));
|
||||
char btn;
|
||||
char btn = '\0';
|
||||
eSpecType type = edit_stack.top().node.type;
|
||||
if(field == "sdf1") btn = (*type).sd1_btn;
|
||||
else if(field == "sdf2") btn = (*type).sd2_btn;
|
||||
|
@@ -587,7 +587,7 @@ static bool edit_out_wand_monst(cDialog& me, std::string hit, short which, cOutd
|
||||
me.untoast();
|
||||
save_out_wand(me, which, wand, 100);
|
||||
std::string fld = hit.substr(7);
|
||||
short i;
|
||||
short i = 0;
|
||||
if(fld[0] == 'f') {
|
||||
i = choose_text(STRT_MONST,wand.monst[fld[3] - '1']-1,&me,"Choose Which Monster:") + 1;
|
||||
if(i >= 0) wand.monst[fld[3] - '1'] = i;
|
||||
@@ -1483,22 +1483,22 @@ bool resize_outdoors() {
|
||||
if(mod.top > 0) {
|
||||
int y = new_h - mod.top;
|
||||
while(y--) {
|
||||
scenario.outdoors.row(y + mod.top) = std::move(scenario.outdoors.row(y));
|
||||
scenario.outdoors.row(y + mod.top) = scenario.outdoors.row(y);
|
||||
}
|
||||
} else if(mod.top < 0) {
|
||||
for(int y = -mod.top; y < old_h; y++) {
|
||||
scenario.outdoors.row(y + mod.top) = std::move(scenario.outdoors.row(y));
|
||||
scenario.outdoors.row(y + mod.top) = scenario.outdoors.row(y);
|
||||
}
|
||||
}
|
||||
|
||||
if(mod.left > 0) {
|
||||
int x = new_w - mod.left;
|
||||
while(x--) {
|
||||
scenario.outdoors.col(x + mod.left) = std::move(scenario.outdoors.col(x));
|
||||
scenario.outdoors.col(x + mod.left) = scenario.outdoors.col(x);
|
||||
}
|
||||
} else if(mod.left < 0) {
|
||||
for(int x = -mod.left; x < old_w; x++) {
|
||||
scenario.outdoors.col(x + mod.left) = std::move(scenario.outdoors.col(x));
|
||||
scenario.outdoors.col(x + mod.left) = scenario.outdoors.col(x);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user