mirror of
https://github.com/TomHarte/CLK.git
synced 2026-03-11 04:42:20 +00:00
Merge pull request #1618 from TomHarte/FurtherWarnings
Localise shorthand `Storage`; note that labels may be unused.
This commit is contained in:
@@ -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_;
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
#include "OpenGL.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -266,9 +266,6 @@ struct Processor: public Storage<model, Traits> {
|
||||
the next thing it intends to do is fetch a new opcode.
|
||||
*/
|
||||
inline void restart_operation_fetch();
|
||||
|
||||
private:
|
||||
using Storage = Storage<model, Traits>;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -21,12 +21,14 @@ namespace CPU::MOS6502Mk2 {
|
||||
|
||||
template <Model model, typename Traits>
|
||||
void Processor<model, Traits>::restart_operation_fetch() {
|
||||
using Storage = Storage<model, Traits>;
|
||||
Storage::resume_point_ = Storage::ResumePoint::FetchDecode;
|
||||
Storage::cycles_ = Cycles(0);
|
||||
}
|
||||
|
||||
template <Model model, typename Traits>
|
||||
void Processor<model, Traits>::run_for(const Cycles cycles) {
|
||||
using Storage = Storage<model, Traits>;
|
||||
using ResumePoint = Storage::ResumePoint;
|
||||
using InterruptRequest = Storage::Inputs::InterruptRequest;
|
||||
auto ®isters = Storage::registers_;
|
||||
@@ -395,7 +397,7 @@ void Processor<model, Traits>::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<model, Traits>::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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user