Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Reorder member variables in constructor
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

robiwan
New Member

8 Posts

Posted - Apr 10 2015 :  06:56:08 AM  Show Profile  Reply with Quote
The order of the variables in constructors should be the same order as they appear in the C++ header file. It would be nice to have a function to reorder them automatically with VA.

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - Apr 11 2015 :  8:36:46 PM  Show Profile  Reply with Quote
Are you talking about the order of the initializer list on a class constructor? Like this:

class CSortMemberInitialization
{
private:
    int m_nWidth;
    int m_nHeight;
    std::string m_strName;

public:
    CSortMemberInitialization();
};

CSortMemberInitialization::CSortMemberInitialization() : m_strName("test"), m_nHeight(0), m_nWidth(0)
{
}

if so then we are considering a feature to make sure the initializer list and then class members are in the same order:

case=8368

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000