Inline
Last modified: 18 January 2023Refactor | Inline
<context menu of a selection>| Refactor | Inline
Ctrl+Alt+N
CLion provides the following inline refactorings:
Inline Constant. This refactoring is opposite to the Extract constant refactoring.
Inline Define. This refactoring is opposite to the Extract define refactoring.
Inline Typedef. This refactoring is opposite to the Extract typedef refactoring.
Inline Parameter. This refactoring is opposite to the Extract parameter refactoring.
Inline Function. This refactoring is opposite to the Extract function refactoring.
tip
With Inline refactoring, you can expand macros right in the editor.
Examples
Before | After |
---|---|
|
|
Before | After |
---|---|
|
|
Before | After |
---|---|
|
|
Before | After |
---|---|
|
|
Perform inline refactoring
Position the caret at the desired symbol to be inlined.
Do one of the following:
From the main menu or from the context menu, choose Refactor | Inline.
Press Ctrl+Alt+N.
In the Inline dialog that corresponds to the selected symbol, confirm the inline refactoring or view the selected symbol usages in Find Refactoring Preview.
Thanks for your feedback!