mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-22 12:33:29 +00:00
Further tightens const
and constexpr
usage.
This commit is contained in:
parent
f82e4ee923
commit
66c2eb0414
@ -51,7 +51,7 @@ class Base {
|
||||
}
|
||||
|
||||
protected:
|
||||
const static int output_lag = 11; // i.e. pixel output will occur 11 cycles after corresponding data read.
|
||||
static constexpr int output_lag = 11; // i.e. pixel output will occur 11 cycles after corresponding data read.
|
||||
|
||||
// The default TMS palette.
|
||||
const uint32_t palette[16] = {
|
||||
|
@ -29,8 +29,8 @@
|
||||
#include "Cartridges/Unpaged.hpp"
|
||||
|
||||
namespace {
|
||||
static const double NTSC_clock_rate = 1194720;
|
||||
static const double PAL_clock_rate = 1182298;
|
||||
static constexpr double NTSC_clock_rate = 1194720;
|
||||
static constexpr double PAL_clock_rate = 1182298;
|
||||
}
|
||||
|
||||
namespace Atari2600 {
|
||||
|
@ -121,13 +121,13 @@ class MappedKeyboardMachine: public Inputs::Keyboard::Delegate, public KeyboardM
|
||||
};
|
||||
|
||||
/// Terminates a key sequence from the character mapper.
|
||||
static const uint16_t KeyEndSequence = 0xffff;
|
||||
static constexpr uint16_t KeyEndSequence = 0xffff;
|
||||
|
||||
/*!
|
||||
Indicates that a key is not mapped (for the keyboard mapper) or that a
|
||||
character cannot be typed (for the character mapper).
|
||||
*/
|
||||
static const uint16_t KeyNotMapped = 0xfffe;
|
||||
static constexpr uint16_t KeyNotMapped = 0xfffe;
|
||||
|
||||
/*!
|
||||
Allows individual machines to provide the mapping between host keys
|
||||
|
@ -83,7 +83,7 @@ class CRT {
|
||||
|
||||
Outputs::Display::ScanTarget *scan_target_ = &Outputs::Display::NullScanTarget::singleton;
|
||||
Outputs::Display::ScanTarget::Modals scan_target_modals_;
|
||||
static const uint8_t DefaultAmplitude = 80;
|
||||
static constexpr uint8_t DefaultAmplitude = 80;
|
||||
|
||||
#ifndef NDEBUG
|
||||
size_t allocated_data_length_ = std::numeric_limits<size_t>::min();
|
||||
|
@ -91,7 +91,7 @@ struct Microcycle {
|
||||
/// Provides the 68000's bus grant line — indicating whether a bus request has been acknowledged.
|
||||
static constexpr int BusGrant = 1 << 10;
|
||||
|
||||
/// Contains a valid combination of the various static const int flags, describing the operation
|
||||
/// Contains a valid combination of the various static constexpr int flags, describing the operation
|
||||
/// performed by this Microcycle.
|
||||
int operation = 0;
|
||||
|
||||
|
@ -323,7 +323,7 @@ class ProcessorStorage {
|
||||
static constexpr int DestinationMask = 1 << 6;
|
||||
uint8_t action = uint8_t(Action::None);
|
||||
|
||||
static const uint16_t NoBusProgram = std::numeric_limits<uint16_t>::max();
|
||||
static constexpr uint16_t NoBusProgram = std::numeric_limits<uint16_t>::max();
|
||||
uint16_t bus_program = NoBusProgram;
|
||||
|
||||
MicroOp() {}
|
||||
|
Loading…
Reference in New Issue
Block a user