bool ccMaterialSet::append(const ccMaterialSet& source) { try { reserve(size()+source.size()); } catch(.../*const std::bad_alloc&*/) //out of memory { ccLog::Warning("[ccMaterialSet::append] Not enough memory"); return false; } for (ccMaterialSet::const_iterator it = source.begin(); it!=source.end(); ++it) { push_back(*it); back().texture.detach(); } return true; }
bool ccMaterialSet::append(const ccMaterialSet& source) { try { reserve(size()+source.size()); } catch(.../*const std::bad_alloc&*/) //out of memory { ccLog::Warning("[ccMaterialSet::append] Not enough memory"); return false; } for (ccMaterialSet::const_iterator it = source.begin(); it!=source.end(); ++it) { push_back(*it); //back().getTexture().detach(); //FIXME: was in the old version (non shared images)... still meaningful? or even necessary? } return true; }