Get rid of an unused member field in the XRC sample
This fixes MSVC 14 warning about a local variable shadowing a class member and makes the code less confusing.
This commit is contained in:
parent
43340b3526
commit
fd137b1876
2 changed files with 2 additions and 3 deletions
|
|
@ -120,7 +120,7 @@ void ObjrefDialog::OnNotebookPageChanged( wxNotebookEvent &event )
|
|||
case icons_page:
|
||||
{
|
||||
wxNotebookPage *page = nb->GetPage(icons_page);
|
||||
text = XRCCTRL(*page, "log_text", wxTextCtrl);
|
||||
wxTextCtrl* const text = XRCCTRL(*page, "log_text", wxTextCtrl);
|
||||
if (text)
|
||||
delete wxLog::SetActiveTarget(new wxLogTextCtrl(text));
|
||||
break;
|
||||
|
|
@ -130,7 +130,7 @@ void ObjrefDialog::OnNotebookPageChanged( wxNotebookEvent &event )
|
|||
{
|
||||
wxNotebookPage *page = nb->GetPage(calc_page);
|
||||
result_txt = XRCCTRL(*page, "result", wxTextCtrl);
|
||||
text = XRCCTRL(*page, "log_text", wxTextCtrl);
|
||||
wxTextCtrl* const text = XRCCTRL(*page, "log_text", wxTextCtrl);
|
||||
if (text)
|
||||
delete wxLog::SetActiveTarget(new wxLogTextCtrl(text));
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ private:
|
|||
void ClearCalculator();
|
||||
|
||||
wxNotebook *nb;
|
||||
wxTextCtrl *text;
|
||||
wxTextCtrl *result_txt;
|
||||
int current;
|
||||
int previous;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue