Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
unused varibles in manager.cpp - wxAUI
Der Meister:
This depends on the macro wxASSERT_MSG. According to the wxWidgets documentation wxASSERT (and all other wxASSERT_* macros) is replaced with nothing in release mode and thus the variable pane in this example is only used in Debug-Mode. Thus I would leave it even if it brings up a warning in release mode.
Just another thing: I don't know the code and this it might be even correct but to me it looks a bit strange that 'SetActivePane' uses 'm_panes' and not 'pane'. Is this really correct this way? And is the call to GetPane really necessary then?
280Z28:
You could wrap it in #ifdef DEBUG
Code::Blocks really doesn't like having wxWidgets in debug mode :(
killerbot:
I agree, ifdef around it (don't like those though).
There should be NO warnings, whatever build, debug or release o ..
Michael:
--- Quote from: Der Meister on January 14, 2006, 07:34:45 pm ---Just another thing: I don't know the code and this it might be even correct but to me it looks a bit strange that 'SetActivePane' uses 'm_panes' and not 'pane'. Is this really correct this way? And is the call to GetPane really necessary then?
--- End quote ---
I am not sure about it. m_panes is defined in the manager.h file:
--- Code: ---private:
wxFrame* m_frame; // the frame being managed
wxDockArt* m_art; // dock art object which does all drawing
unsigned int m_flags; // manager flags wxAUI_MGR_*
wxPaneInfoArray m_panes; // array of panes structures
--- End code ---
m_panes is also used in other functions (manager.cpp).
Michael
280Z28:
I suggest you post this at the Kirix forums so the author can give feedback on this too. :)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version