From 035f07877c57c45fa2073db8987cdc345ffd94bf Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 30 May 2019 12:08:35 -0400 Subject: [PATCH] Reduces conversions to vector. --- Processors/68000/Implementation/68000Storage.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Processors/68000/Implementation/68000Storage.cpp b/Processors/68000/Implementation/68000Storage.cpp index d2b7eff2e..a1157f3f4 100644 --- a/Processors/68000/Implementation/68000Storage.cpp +++ b/Processors/68000/Implementation/68000Storage.cpp @@ -406,7 +406,7 @@ struct ProcessorStorageConstructor { Walks through the sequence of bus steps beginning at @c start, replacing the value supplied for each write encountered with the respective value from @c values. */ - void replace_write_values(BusStep *start, const std::vector &values) { + void replace_write_values(BusStep *start, const std::initializer_list &values) { const auto end = replace_write_values(start, values.begin()); assert(end == values.end()); } @@ -415,7 +415,7 @@ struct ProcessorStorageConstructor { Walks through the sequence of micro-ops beginning at @c start, replacing the value supplied for each write encountered in each micro-op's bus steps with the respective value from @c values. */ - void replace_write_values(ProcessorBase::MicroOp *start, const std::vector &values) { + void replace_write_values(ProcessorBase::MicroOp *start, const std::initializer_list &values) { auto value = values.begin(); while(!start->is_terminal()) { value = replace_write_values(start->bus_program, value); @@ -543,7 +543,7 @@ struct ProcessorStorageConstructor { NB: a vector is used to allow easy iteration. */ - const std::vector mappings = { + const std::initializer_list mappings = { {0xf1f0, 0xc100, Operation::ABCD, Decoder::ABCD_SBCD}, // 4-3 (p107) {0xf1f0, 0x8100, Operation::SBCD, Decoder::ABCD_SBCD}, // 4-171 (p275) {0xffc0, 0x4800, Operation::NBCD, Decoder::MOVEfromSR_NBCD}, // 4-142 (p246) @@ -3056,7 +3056,7 @@ struct ProcessorStorageConstructor { private: ProcessorStorage &storage_; - std::vector::const_iterator replace_write_values(BusStep *start, std::vector::const_iterator value) { + std::initializer_list::const_iterator replace_write_values(BusStep *start, std::initializer_list::const_iterator value) { while(!start->is_terminal()) { // Look for any bus step that writes. Then replace its value, and that of the cycle before it. if(start->microcycle.data_select_active() && !(start->microcycle.operation & Microcycle::Read) && !(start->microcycle.operation & Microcycle::InterruptAcknowledge)) {