IDE: Visual Studio 2005
Assume you have the following two files:
foo.h
foo.cpp
Suppose the following class (in foo.h):
class foo
{
private:
u32 m_one, m_two;
public:
foo( u32 one, u32 two )
: m_one( one )
, m_two( two )
{
}
};
Now right click on foo's constructor (above) and click "Move Implementation to source file". Notice the output in foo.cpp:
foo::foo( u32 one, u32 two ) : m_one( one )
, m_two( two )
{
}
There's two issues with the output generated in foo.cpp by the move operation:
1) Notice that the whitespace before each member in the initializer list has been removed.
2) Notice how the first member in the initializer list, m_one, was removed and put on the same line as the constructor header.
Expected Behavior:
-------------------------------
The output should appear as follows. Whitespace, including carriage returns, should all be retained when moving the implementation over to the CPP/IPP file.
foo::foo( u32 one, u32 two )
: m_one( one )
, m_two( two )
{
}