void visit(LOTPolystarData *) override {}
void visitChildren(LOTGroupData *obj) override
{
- for (auto child : obj->mChildren) {
+ for (const auto& child : obj->mChildren) {
child.get()->accept(this);
if (mRepeaterFound) {
LOTRepeaterData *repeater =
// copy all the child of the object till repeater and
// move that in to a group and then add that group to
// the repeater object.
- for (auto cpChild : obj->mChildren) {
+ for (const auto& cpChild : obj->mChildren) {
if (cpChild == child) break;
// there shouldn't be any trim object left in the child list
if (cpChild.get()->type() == LOTData::Type::Trim) {
void LottieParserImpl::resolveLayerRefs()
{
- for (auto i : mLayersToUpdate) {
+ for (const auto& i : mLayersToUpdate) {
LOTLayerData *layer = i.get();
auto search = compRef->mAssets.find(layer->mPreCompRefId);
if (search != compRef->mAssets.end()) {
}
// update the static property of layer
bool staticFlag = true;
- for (auto child : layer->mChildren) {
+ for (const auto& child : layer->mChildren) {
staticFlag &= child.get()->isStatic();
}
- for (auto mask : layer->mMasks) {
+ for (const auto& mask : layer->mMasks) {
staticFlag &= mask->isStatic();
}
}
}
bool staticFlag = true;
- for (auto child : group->mChildren) {
+ for (const auto& child : group->mChildren) {
staticFlag &= child.get()->isStatic();
}
}
void visitChildren(LOTGroupData *obj) override
{
- for (auto child : obj->mChildren) child.get()->accept(this);
+ for (const auto& child : obj->mChildren) child.get()->accept(this);
switch (obj->type()) {
case LOTData::Type::Layer: {
LOTLayerData *layer = static_cast<LOTLayerData *>(obj);