mirror of
https://github.com/TomHarte/CLK.git
synced 2026-04-20 10:17:05 +00:00
Further doubles down on construction syntax for type conversions.
This commit is contained in:
@@ -16,12 +16,12 @@ AllRAMProcessor::AllRAMProcessor(std::size_t memory_size) :
|
||||
timestamp_(0) {}
|
||||
|
||||
void AllRAMProcessor::set_data_at_address(uint16_t startAddress, std::size_t length, const uint8_t *data) {
|
||||
std::size_t endAddress = std::min(startAddress + length, static_cast<std::size_t>(65536));
|
||||
std::size_t endAddress = std::min(startAddress + length, size_t(65536));
|
||||
std::memcpy(&memory_[startAddress], data, endAddress - startAddress);
|
||||
}
|
||||
|
||||
void AllRAMProcessor::get_data_at_address(uint16_t startAddress, std::size_t length, uint8_t *data) {
|
||||
std::size_t endAddress = std::min(startAddress + length, static_cast<std::size_t>(65536));
|
||||
std::size_t endAddress = std::min(startAddress + length, size_t(65536));
|
||||
std::memcpy(data, &memory_[startAddress], endAddress - startAddress);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user