Skip to main content
Code Review

Return to Answer

Commonmark migration
Source Link
  1. You have many Get... functions, none of which are const. All getter functions should be made const member functions.

    You have many Get... functions, none of which are const. All getter functions should be made const member functions.

    The idea behind const objects and const member function is too long to be included here as an answer. More can be found at Wikipedia and other resources on the web. Briefly, when an object is declared const, it is meant to be read-only. When a member function is declared const, in that function, the object on which the function is called is meant to be read-only.

The idea behind const objects and const member function is too long to be included here as an answer. More can be found at Wikipedia and other resources on the web. Briefly, when an object is declared const, it is meant to be read-only. When a member function is declared const, in that function, the object on which the function is called is meant to be read-only.

  1. CodeAppender has many virtual functions even though it doesn't derive from any base class and it is not a base class of any other classes. I would remove the virtual specifier from those functions unless there is a need for it.

    CodeAppender has many virtual functions even though it doesn't derive from any base class and it is not a base class of any other classes. I would remove the virtual specifier from those functions unless there is a need for it.

  1. You have many Get... functions, none of which are const. All getter functions should be made const member functions.

The idea behind const objects and const member function is too long to be included here as an answer. More can be found at Wikipedia and other resources on the web. Briefly, when an object is declared const, it is meant to be read-only. When a member function is declared const, in that function, the object on which the function is called is meant to be read-only.

  1. CodeAppender has many virtual functions even though it doesn't derive from any base class and it is not a base class of any other classes. I would remove the virtual specifier from those functions unless there is a need for it.
  1. You have many Get... functions, none of which are const. All getter functions should be made const member functions.

    The idea behind const objects and const member function is too long to be included here as an answer. More can be found at Wikipedia and other resources on the web. Briefly, when an object is declared const, it is meant to be read-only. When a member function is declared const, in that function, the object on which the function is called is meant to be read-only.

  2. CodeAppender has many virtual functions even though it doesn't derive from any base class and it is not a base class of any other classes. I would remove the virtual specifier from those functions unless there is a need for it.

Expanded the answer
Source Link
R Sahu
  • 3.6k
  • 13
  • 20
  1. You have many Get... functions, none of which are const. All getter functions should be made const member functions.

    You have many Get... functions, none of which are const. All getter functions should be made const member functions.

The idea behind const objects and const member function is too long to be included here as an answer. More can be found at Wikipedia and other resources on the web. Briefly, when an object is declared const, it is meant to be read-only. When a member function is declared const, in that function, the object on which the function is called is meant to be read-only.

  1. CodeAppender has many virtual functions even though it doesn't derive from any base class and it is not a base class of any other classes. I would remove the virtual specifier from those functions unless there is a need for it.

    CodeAppender has many virtual functions even though it doesn't derive from any base class and it is not a base class of any other classes. I would remove the virtual specifier from those functions unless there is a need for it.
  1. You have many Get... functions, none of which are const. All getter functions should be made const member functions.

  2. CodeAppender has many virtual functions even though it doesn't derive from any base class and it is not a base class of any other classes. I would remove the virtual specifier from those functions unless there is a need for it.

  1. You have many Get... functions, none of which are const. All getter functions should be made const member functions.

The idea behind const objects and const member function is too long to be included here as an answer. More can be found at Wikipedia and other resources on the web. Briefly, when an object is declared const, it is meant to be read-only. When a member function is declared const, in that function, the object on which the function is called is meant to be read-only.

  1. CodeAppender has many virtual functions even though it doesn't derive from any base class and it is not a base class of any other classes. I would remove the virtual specifier from those functions unless there is a need for it.
Source Link
R Sahu
  • 3.6k
  • 13
  • 20
  1. You have many Get... functions, none of which are const. All getter functions should be made const member functions.

  2. CodeAppender has many virtual functions even though it doesn't derive from any base class and it is not a base class of any other classes. I would remove the virtual specifier from those functions unless there is a need for it.

lang-cpp

AltStyle によって変換されたページ (->オリジナル) /