Don't compare invalid iterators in wxCommandProcessor::IsDirty().
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 25 Jan 2012 00:05:09 +0000 (00:05 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 25 Jan 2012 00:05:09 +0000 (00:05 +0000)
commitef20428e992975d27f38c8eeefa0f4c5006e7589
treeed73fd339cf9788dfeb808492300b3489013b33b
parent58d77880bba1cb3e2d84bdd29d32a016342a0144
Don't compare invalid iterators in wxCommandProcessor::IsDirty().

Check that m_lastSavedCommand is valid before comparing it with
m_currentCommand as comparing invalid iterators results in an assert in STL
build (and probably should also result in an assert in non-STL build too for
consistency).

Also move IsDirty() implementation out of line to make it easier to modify it
further in the future and because there is no real reason to keep it inline.

Closes #13465.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/cmdproc.h
src/common/cmdproc.cpp