Skip to content

Commit de71045

Browse files
committed
Clean code
1 parent 4783cc8 commit de71045

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/box/branching_scheme.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ const std::vector<BranchingScheme::Insertion>& BranchingScheme::insertions(
510510
continue;
511511
// For all valid rotations.
512512
for (int rotation = 0; rotation < 6; ++rotation) {
513-
if (!instance.item_type(item_type_id).can_rotate(rotation))
513+
if (!item_type.can_rotate(rotation))
514514
continue;
515515
insertion_item(
516516
parent,
@@ -564,7 +564,7 @@ const std::vector<BranchingScheme::Insertion>& BranchingScheme::insertions(
564564
if (parent->item_number_of_copies[item_type_id] == item_type.copies)
565565
continue;
566566
for (int rotation = 0; rotation < 6; ++rotation) {
567-
if (!instance.item_type(item_type_id).can_rotate(rotation))
567+
if (!item_type.can_rotate(rotation))
568568
continue;
569569
insertion_item(
570570
parent,
@@ -913,7 +913,7 @@ nlohmann::json BranchingScheme::json_export_init() const
913913

914914
json_items_init_ids_[item_type_id] = std::vector<Counter>(2);
915915
for (int rotation = 0; rotation < 6; ++rotation) {
916-
if (!instance().item_type(item_type_id).can_rotate(rotation))
916+
if (!item_type.can_rotate(rotation))
917917
continue;
918918

919919
json_items_init_ids_[item_type_id][rotation] = i;

0 commit comments

Comments
 (0)