Commit Graph

6 Commits (0.7.0)

Author SHA1 Message Date
elsid dba79f4d4d
Fix warnings: catching polymorphic type by value
openmw/apps/openmw/mwworld/worldimp.cpp: In member function ‘virtual bool MWWorld::World::findExteriorPosition(const string&, ESM::Position&)’:
openmw/apps/openmw/mwworld/worldimp.cpp:2650:25: warning: catching polymorphic type ‘class std::invalid_argument’ by value [-Wcatch-value=]
             catch (std::invalid_argument)
                         ^~~~~~~~~~~~~~~~
openmw/apps/openmw/mwworld/worldimp.cpp:2654:25: warning: catching polymorphic type ‘class std::out_of_range’ by value [-Wcatch-value=]
             catch (std::out_of_range)
                         ^~~~~~~~~~~~

openmw/components/widgets/numericeditbox.cpp: In member function ‘void Gui::NumericEditBox::onEditTextChange(MyGUI::EditBox*)’:
openmw/components/widgets/numericeditbox.cpp:41:21: warning: catching polymorphic type ‘class std::invalid_argument’ by value [-Wcatch-value=]
         catch (std::invalid_argument)
                     ^~~~~~~~~~~~~~~~
openmw/components/widgets/numericeditbox.cpp:45:21: warning: catching polymorphic type ‘class std::out_of_range’ by value [-Wcatch-value=]
         catch (std::out_of_range)
                     ^~~~~~~~~~~~
6 years ago
scrawl 9fda3b6db4 Fix NumericEditBox behavior broken by switch to std::stoi
For some reason stoi doesn't throw an error for '1foo' while 'foo1' does.

Now the edit box flat out rejects any non-digit key events.
7 years ago
scrawl 76ddf8d794 Support Up/DownArrow keys to change NumericEditBox value 7 years ago
Bret Curtis c6805314c2 be explicit about what we are trying to catch instead of catching everything and fixed up formatting
use Allman style brackets not K&R style, additional formatting for fallback.cpp which needed some love

revert allman formatting changes
7 years ago
Bret Curtis d48b829b45 replace and purge boost::lexical_cast 7 years ago
scrawl 0bc840aadd Add NumericEditBox widget 10 years ago