Bug 511348 - [Feature request] Add "Change function's return and param types (or just prototype)"
Summary: [Feature request] Add "Change function's return and param types (or just prot...
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-refactoring (show other bugs)
Version: Next   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-31 01:46 EST by soman namos CLA
Modified: 2020-09-04 15:25 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description soman namos CLA 2017-01-31 01:46:16 EST
It would be nice to have an ability to easily change function's return and parameter types, because sometimes 'Rename' is not appropriate. For example:

============================================
class Player
{
public:
  const PairInt& getPosition() const;
  void setPosition(const PairInt &pos);
  const PairInt& getSize() const;
  void setSize(const PairInt &size);
  // ...
};
============================================

Now when I want to change the type of position [only] to PairFloat 'Refactor => Rename' offers to change all 4 occurences in this example which is not appropriate. It would be nice to change the prototype of function where you can rename next things:
 - function parameter's type and name;
 - function return value's type and name;
Changing should be used only for single specified function and be done in header and cpp (if definition exists in cpp).