Author Topic: "Swap header/source" and "Find declaration/implementation..."  (Read 4586 times)

bonsaiben

  • Guest
"Swap header/source" and "Find declaration/implementation..."
« on: October 04, 2010, 06:36:17 am »
I don't understand why "Swap header/source" is able to find the matching header/source file to the file you're currently viewing, but "Find declaration/implementation" shows a list of every file containing a function of the same name as the one you clicked. Why can't it just look in the matching header/source file?? :shock:

This isn't really a feature request... I'm sorta just perplexed by this and would like to know if there's some explanation for it... because it seems like a no brainer to me! Just being honest. :?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: "Swap header/source" and "Find declaration/implementation..."
« Reply #1 on: October 04, 2010, 07:20:36 am »
I don't understand why "Swap header/source" is able to find the matching header/source file to the file you're currently viewing, but "Find declaration/implementation" shows a list of every file containing a function of the same name as the one you clicked. Why can't it just look in the matching header/source file?? :shock:

Which version of CB did you use? cc-branch or the trunk?

I suggest you could try the cc_branch nightly. if the bug still exists, You can give a sample test project and I can test for you.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.