jjzjj

ExportAnimation

全部标签

c++ - 代码审查问题——我应该允许将 auto_ptr 作为参数传递吗?

考虑我最近在我们的代码库中看到的以下示例代码:voidClassA::ExportAnimation(auto_ptranimation){...doessomething}//callingmethod:voidclassB::someMethod(){auto_ptranimation(newCAnimation(1,2));ClassAclassAInstance;classAInstance.ExportAnimation(animation)...dosomemorestuff}我不喜欢这样——我宁愿这样写:voidClassA::ExportAnimation(CAnima