1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-23 05:29:23 +00:00

Apply maybe_unused judiciously.

This commit is contained in:
Thomas Harte 2023-05-15 10:17:04 -04:00
parent 9342c6005f
commit a1a7c0e253
6 changed files with 18 additions and 20 deletions

View File

@ -15,7 +15,7 @@ namespace TI::TMS {
template <Personality personality>
template <SpriteMode mode, bool double_width>
void Base<personality>::draw_sprites(uint8_t y, int start, int end, const std::array<uint32_t, 16> &palette, int *colour_buffer) {
void Base<personality>::draw_sprites([[maybe_unused]] uint8_t y, int start, int end, const std::array<uint32_t, 16> &palette, int *colour_buffer) {
if(!draw_line_buffer_->sprites) {
return;
}
@ -346,7 +346,7 @@ void Base<personality>::draw_tms_text(int start, int end) {
// MARK: - Master System
template <Personality personality>
void Base<personality>::draw_sms(int start, int end, uint32_t cram_dot) {
void Base<personality>::draw_sms([[maybe_unused]] int start, [[maybe_unused]] int end, [[maybe_unused]] uint32_t cram_dot) {
if constexpr (is_sega_vdp(personality)) {
int colour_buffer[256];
auto &line_buffer = *draw_line_buffer_;
@ -451,7 +451,7 @@ void Base<personality>::draw_sms(int start, int end, uint32_t cram_dot) {
template <Personality personality>
template <ScreenMode mode>
void Base<personality>::draw_yamaha(uint8_t y, int start, int end) {
const auto active_palette = palette();
[[maybe_unused]] const auto active_palette = palette();
const int sprite_start = start >> 2;
const int sprite_end = end >> 2;
auto &line_buffer = *draw_line_buffer_;

View File

@ -588,7 +588,7 @@ struct SMSSequencer {
};
template <Personality personality>
template<bool use_end> void Base<personality>::fetch_sms(uint8_t y, int start, int end) {
template<bool use_end> void Base<personality>::fetch_sms([[maybe_unused]] uint8_t y, [[maybe_unused]] int start, [[maybe_unused]] int end) {
if constexpr (is_sega_vdp(personality)) {
SMSSequencer<personality> sequencer(this, y);
dispatch<use_end>(sequencer, start, end);

View File

@ -129,7 +129,7 @@ bool Line<include_clock>::read() const {
}
template <bool include_clock>
void Line<include_clock>::set_read_delegate(ReadDelegate *delegate, Storage::Time bit_length) {
void Line<include_clock>::set_read_delegate(ReadDelegate *delegate, [[maybe_unused]] Storage::Time bit_length) {
read_delegate_ = delegate;
if constexpr (!include_clock) {
assert(bit_length > Storage::Time(0));

View File

@ -228,7 +228,7 @@ class ConcreteMachine:
uint8_t character_generator = 1; /* 0 = Japan, 1 = USA, etc, 2 = USSR */
uint8_t date_format = 1; /* 0 = Y/M/D, 1 = M/D/Y, 2 = D/M/Y */
uint8_t keyboard = 1; /* 0 = Japan, 1 = USA, 2 = France, 3 = UK, 4 = Germany, 5 = USSR, 6 = Spain */
ROM::Name regional_bios_name;
[[maybe_unused]] ROM::Name regional_bios_name;
switch(target.region) {
default:

View File

@ -523,7 +523,7 @@ template<Model model> class ConcreteMachine:
break;
case PartialMachineCycle::Input: {
bool did_match = false;
[[maybe_unused]] bool did_match = false;
*cycle.value = 0xff;
if(!(address&32)) {

View File

@ -727,20 +727,18 @@ void Processor<BusHandler, dtack_is_implicit, permit_overrun, signal_will_perfor
switch(instruction_.operation) {
case InstructionSet::M68k::Operation::Undefined:
if(instruction_.operation == InstructionSet::M68k::Operation::Undefined) {
switch(opcode_ & 0xf000) {
default:
exception_vector_ = InstructionSet::M68k::Exception::IllegalInstruction;
break;
case 0xa000:
exception_vector_ = InstructionSet::M68k::Exception::Line1010;
break;
case 0xf000:
exception_vector_ = InstructionSet::M68k::Exception::Line1111;
break;
}
MoveToStateSpecific(StandardException);
switch(opcode_ & 0xf000) {
default:
exception_vector_ = InstructionSet::M68k::Exception::IllegalInstruction;
break;
case 0xa000:
exception_vector_ = InstructionSet::M68k::Exception::Line1010;
break;
case 0xf000:
exception_vector_ = InstructionSet::M68k::Exception::Line1111;
break;
}
MoveToStateSpecific(StandardException);
StdCASE(NBCD, {
if(instruction_.mode(0) == Mode::DataRegisterDirect) {