Skip to content

Commit 1f84c9e

Browse files
committed
Use .insert_or_assign instead of operator[] or just .insert
Signed-off-by: Lakira Ashley <[email protected]>
1 parent 106fceb commit 1f84c9e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/include/prjxray/xilinx/configuration.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,10 @@ Configuration<Spartan6>::InitWithPackets(const typename Spartan6::Part& part,
363363

364364
for (size_t ii = 0; ii < packet.data().size();
365365
ii += ArchType::words_per_frame) {
366-
frames[current_frame_address] =
366+
frames.insert_or_assign(
367+
current_frame_address,
367368
packet.data().subspan(
368-
ii, ArchType::words_per_frame);
369+
ii, ArchType::words_per_frame));
369370

370371
auto next_address =
371372
part.GetNextFrameAddress(
@@ -487,11 +488,10 @@ Configuration<ArchType>::InitWithPackets(const typename ArchType::Part& part,
487488
// do auto-incrementing block writes.
488489
for (size_t ii = 0; ii < packet.data().size();
489490
ii += ArchType::words_per_frame) {
490-
frames.insert(
491-
{current_frame_address,
492-
packet.data().subspan(
493-
ii,
494-
ArchType::words_per_frame)});
491+
frames.insert_or_assign(
492+
current_frame_address,
493+
packet.data().subspan(
494+
ii, ArchType::words_per_frame));
495495

496496
auto next_address =
497497
part.GetNextFrameAddress(
@@ -523,9 +523,9 @@ Configuration<ArchType>::InitWithPackets(const typename ArchType::Part& part,
523523
current_frame_address =
524524
frame_address_register;
525525
start_dup_write = false;
526-
frames.insert(
527-
{current_frame_address,
528-
frames[last_write_frame_address]});
526+
frames.insert_or_assign(
527+
current_frame_address,
528+
frames[last_write_frame_address]);
529529
}
530530
} break;
531531
default:

0 commit comments

Comments
 (0)