why this -
instead of this -
?
That's slowing down the debug version, I can see the arguments with a breakpoint and the returned value when the debugger steps out of the function (in Visual C++). Any other reason why using that code? Maybe for other IDEs? Wouldn't it be better then if the developer could choose?
Code:
inline b2Vec2 operator + (const b2Vec2& a, const b2Vec2& b)
{
b2Vec2 v; v.Set(a.x + b.x, a.y + b.y);
return v;
}
{
b2Vec2 v; v.Set(a.x + b.x, a.y + b.y);
return v;
}
instead of this -
Code:
inline b2Vec2 operator + (const b2Vec2& a, const b2Vec2& b)
{
return b2Vec2(a.x + b.x, a.y + b.y);
}
{
return b2Vec2(a.x + b.x, a.y + b.y);
}
?
That's slowing down the debug version, I can see the arguments with a breakpoint and the returned value when the debugger steps out of the function (in Visual C++). Any other reason why using that code? Maybe for other IDEs? Wouldn't it be better then if the developer could choose?