S
steve yee
the code is like this:
class Asn_T
{
public:
DataType_T m_data;
};
class MyData
{
MyDataType m_data;
public:
Asn_T& Convert(Asn_T& asn)
{
// coverting codes goes here
return asn;
}
};
in a code review, some members of our team argued strongly that the
function MyData::Convert() should not return Asn_T&, instead, it should
be declared as returning void,because the return value is seldom used,
and it's enough to use the input parameter.
but i think this style of function declaration is more flexible, thus
is more reasonal.
i want to know your opinion about it. thanks
class Asn_T
{
public:
DataType_T m_data;
};
class MyData
{
MyDataType m_data;
public:
Asn_T& Convert(Asn_T& asn)
{
// coverting codes goes here
return asn;
}
};
in a code review, some members of our team argued strongly that the
function MyData::Convert() should not return Asn_T&, instead, it should
be declared as returning void,because the return value is seldom used,
and it's enough to use the input parameter.
but i think this style of function declaration is more flexible, thus
is more reasonal.
i want to know your opinion about it. thanks