Thread: Does wxDevCPP have a way to get rid of unused generated functions?

  1. #1
    Ethernal Noob
    Join Date
    Nov 2001

    Does wxDevCPP have a way to get rid of unused generated functions?

    Let's say I add a control to a form and when I click on an event wxDevcpp generates a function header and shell in the h/cpp files. If I delete the control and no longer need the event handler, do I have to manually delete both or is there a way to delete any reference to the function and it's declaration?

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Farncombe, Surrey, England
    I don't know about wxDevCPP, but Visual studio (at least until version 7) has had this "feature" that you have to remove the functions yourself. My guess is that it has something to do with the fact that the IDE don't know if you are re-using these functions for some other purpose, and thus takes the "safe" approach of never removing any code.

    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Ethernal Noob
    Join Date
    Nov 2001
    in visual studio at least with C#, if you click on the event handler next to the event in the toolbox and press delete, it gets rid of it in the code generation file, and if it's empty in the definition, it gets rid of it. But if it has code inside the block it keeps it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Static member functions more efficient?
    By drrngrvy in forum C++ Programming
    Replies: 6
    Last Post: 06-16-2006, 07:07 AM
  2. Passing pointers between functions
    By heygirls_uk in forum C Programming
    Replies: 5
    Last Post: 01-09-2004, 06:58 PM
  3. Attaching functions to a class/struct
    By VirtualAce in forum Tech Board
    Replies: 2
    Last Post: 08-04-2003, 10:56 AM
  4. Expression Manipulator v0.2 (bug fixes, functions)
    By ygfperson in forum A Brief History of
    Replies: 4
    Last Post: 05-26-2003, 04:52 PM
  5. API "Clean Up" Functions & delete Pointers :: Winsock
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 05-10-2002, 06:53 PM