Nuke as many warnings as possible, and several globals as well
- Warnings completely suppressed for the included TinyXML and gzstream libraries - Parentheses warnings are now errors, since there were several that looked like bugs - Ditto for dangling else warnings Some of these warnings were actually bugs: - Town wandering monsters would have never spawned, because the code to do so was accidentally nested within a check for overall_mode == MODE_OUTDOORS ---> boe.monster.cpp, lines 105-137 - Monster's behaviour with respect to elemental fields did not correctly depend on their immunities (this is the same precedence issue Sylae messed up fixing in the Windows code) ---> boe.monsters.cpp, lines 345-359 - Display of damage blocked by armour appeared to be incorrect (needs verification) ---> boe.newgraph.cpp, line 1079 - Three-choice dialogs probably weren't dealing with unusual button types correctly, though that's a minor point since they aren't expected to use such buttons
This commit is contained in:
@@ -76,11 +76,11 @@ void cPict::attachClickHandler(click_callback_t f) throw(){
|
||||
}
|
||||
}
|
||||
|
||||
void cPict::attachFocusHandler(focus_callback_t f) throw(xHandlerNotSupported){
|
||||
void cPict::attachFocusHandler(focus_callback_t) throw(xHandlerNotSupported){
|
||||
throw xHandlerNotSupported(true);
|
||||
}
|
||||
|
||||
bool cPict::triggerClickHandler(cDialog& me, std::string id, eKeyMod mods, location where){
|
||||
bool cPict::triggerClickHandler(cDialog& me, std::string id, eKeyMod mods){
|
||||
if(onClick != NULL) return onClick(me,id,mods);
|
||||
else return false;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ short cPict::getFormat(eFormat prop) throw(xUnsupportedProp){
|
||||
else throw xUnsupportedProp(prop);
|
||||
}
|
||||
|
||||
void cPict::setColour(sf::Color clr) throw(xUnsupportedProp) {
|
||||
void cPict::setColour(sf::Color) throw(xUnsupportedProp) {
|
||||
// TODO: Colour is not supported
|
||||
}
|
||||
|
||||
@@ -419,11 +419,17 @@ ePicType& operator-= (ePicType& lhs, ePicTypeMod rhs){
|
||||
return lhs = lhs - rhs;
|
||||
}
|
||||
|
||||
bool operator& (ePicType lhs, ePicTypeMod rhs) {
|
||||
return lhs == (lhs + PIC_PRESET) + rhs;
|
||||
}
|
||||
|
||||
short cPict::animFrame = 0;
|
||||
|
||||
std::shared_ptr<sf::Texture> cPict::getSheet(eSheetType type, size_t n) {
|
||||
std::ostringstream sout;
|
||||
switch(type) {
|
||||
case NUM_SHEET_TYPES:
|
||||
break;
|
||||
case SHEET_TER:
|
||||
sout << "ter" << n + 1;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user