diff --git a/Machines/Acorn/BBCMicro/BBCMicro.cpp b/Machines/Acorn/BBCMicro/BBCMicro.cpp index 65bfb9da7..174c5e5c1 100644 --- a/Machines/Acorn/BBCMicro/BBCMicro.cpp +++ b/Machines/Acorn/BBCMicro/BBCMicro.cpp @@ -609,7 +609,7 @@ private: OutputMode previous_output_mode_ = OutputMode::Sync; int cycles_ = 0; - int cycles_into_hsync_ = 0; +// int cycles_into_hsync_ = 0; Outputs::CRT::CRT crt_; diff --git a/Outputs/OpenGL/Screenshot.hpp b/Outputs/OpenGL/Screenshot.hpp index c0e5af299..716417d69 100644 --- a/Outputs/OpenGL/Screenshot.hpp +++ b/Outputs/OpenGL/Screenshot.hpp @@ -10,6 +10,8 @@ #include "OpenGL.hpp" +#include + namespace Outputs::Display::OpenGL { /*! @@ -37,13 +39,13 @@ struct Screenshot { // Flip the contents into raster order. const size_t line_size = size_t(width * 4); + std::vector temp(line_size, 0); for(size_t y = 0; y < size_t(height) / 2; ++y) { const size_t flipped_y = size_t(height - 1) - y; - uint8_t temp[line_size]; - memcpy(temp, &pixel_data[flipped_y * line_size], line_size); + memcpy(temp.data(), &pixel_data[flipped_y * line_size], line_size); memcpy(&pixel_data[flipped_y * line_size], &pixel_data[y * line_size], line_size); - memcpy(&pixel_data[y * line_size], temp, line_size); + memcpy(&pixel_data[y * line_size], temp.data(), line_size); } } diff --git a/Processors/6502Mk2/6502Mk2.hpp b/Processors/6502Mk2/6502Mk2.hpp index 609703212..bd4388347 100644 --- a/Processors/6502Mk2/6502Mk2.hpp +++ b/Processors/6502Mk2/6502Mk2.hpp @@ -266,9 +266,6 @@ struct Processor: public Storage { the next thing it intends to do is fetch a new opcode. */ inline void restart_operation_fetch(); - -private: - using Storage = Storage; }; } diff --git a/Processors/6502Mk2/Implementation/6502.hpp b/Processors/6502Mk2/Implementation/6502.hpp index 9f8ffff37..0df53caeb 100644 --- a/Processors/6502Mk2/Implementation/6502.hpp +++ b/Processors/6502Mk2/Implementation/6502.hpp @@ -21,12 +21,14 @@ namespace CPU::MOS6502Mk2 { template void Processor::restart_operation_fetch() { + using Storage = Storage; Storage::resume_point_ = Storage::ResumePoint::FetchDecode; Storage::cycles_ = Cycles(0); } template void Processor::run_for(const Cycles cycles) { + using Storage = Storage; using ResumePoint = Storage::ResumePoint; using InterruptRequest = Storage::Inputs::InterruptRequest; auto ®isters = Storage::registers_; @@ -395,7 +397,7 @@ void Processor::run_for(const Cycles cycles) { std::swap(Storage::address_.halves.high, Storage::operand_); goto access_absolute; - absolute_indexed_65c02_tail: + [[maybe_unused]] absolute_indexed_65c02_tail: access(BusOperation::Read, Literal(registers.pc.full), throwaway); goto access_absolute; @@ -449,7 +451,7 @@ void Processor::run_for(const Cycles cycles) { goto access_absolute; - indirect_indexed_65c02_tail: + [[maybe_unused]] indirect_indexed_65c02_tail: access(BusOperation::Read, Literal(registers.pc.full), throwaway); goto access_absolute;