Check validity of wxSizerFlags::Border() direction parameter.
Catch the misguided attempts to pass the size of the border as the first parameter of the Border(direction, size) overload. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -125,6 +125,10 @@ public:
|
|||||||
|
|
||||||
wxSizerFlags& Border(int direction, int borderInPixels)
|
wxSizerFlags& Border(int direction, int borderInPixels)
|
||||||
{
|
{
|
||||||
|
wxCHECK_MSG( !(direction & ~wxALL), *this,
|
||||||
|
wxS("direction must be a combination of wxDirection enum "
|
||||||
|
"values.") );
|
||||||
|
|
||||||
m_flags &= ~wxALL;
|
m_flags &= ~wxALL;
|
||||||
m_flags |= direction;
|
m_flags |= direction;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user