fix VC compilation warnings about implicit int->bool conversion after last check in

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2006-06-27 14:12:05 +00:00
parent a65ffcb229
commit 57b49e9445

View File

@ -64,25 +64,29 @@ public: // public API
{ return GetTextCtrlItem()->GetProportion(); } { return GetTextCtrlItem()->GetProportion(); }
bool IsTextCtrlGrowable() const bool IsTextCtrlGrowable() const
{ return GetTextCtrlItem()->GetFlag() & wxGROW; } { return (GetTextCtrlItem()->GetFlag() & wxGROW) != 0; }
void SetTextCtrlGrowable(bool grow = true) void SetTextCtrlGrowable(bool grow = true)
{ {
int f = GetDefaultTextCtrlFlag(); int f = GetDefaultTextCtrlFlag();
if (grow) if ( grow )
GetTextCtrlItem()->SetFlag(f | wxGROW); f |= wxGROW;
else else
GetTextCtrlItem()->SetFlag(f & ~wxGROW); f &= ~wxGROW;
GetTextCtrlItem()->SetFlag(f);
} }
bool IsPickerCtrlGrowable() const bool IsPickerCtrlGrowable() const
{ return GetPickerCtrlItem()->GetFlag() & wxGROW; } { return (GetPickerCtrlItem()->GetFlag() & wxGROW) != 0; }
void SetPickerCtrlGrowable(bool grow = true) void SetPickerCtrlGrowable(bool grow = true)
{ {
int f = GetDefaultPickerCtrlFlag(); int f = GetDefaultPickerCtrlFlag();
if (grow) if ( grow )
GetPickerCtrlItem()->SetFlag(f | wxGROW); f |= wxGROW;
else else
GetPickerCtrlItem()->SetFlag(f & ~wxGROW); f &= ~wxGROW;
GetPickerCtrlItem()->SetFlag(f);
} }
bool HasTextCtrl() const bool HasTextCtrl() const