Convert local to field, Replace literal with constant, C++ refactoring: convert local to field – Slick EDIT V3.3 User Manual

Page 235: C++ refactoring: replace literal with constant

Advertising
background image

Convert Local to Field

Moves a local variable from the body of a method into an instance member variable in the current class.
References to the local variable are replaced with references to the new data member. This refactoring
cannot be used to convert a method parameter to a field.

Figure 6.46. C++ Refactoring: Convert Local to Field

Replace Literal with Constant

Replaces the selected literal with a constant, replacing use of the literal with the new constant.

Figure 6.47. C++ Refactoring: Replace Literal with Constant

C++ Refactoring

213

Advertising