1
0
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:
Thomas Harte
2020-05-09 23:00:39 -04:00
parent 3729bddb2a
commit 25996ce180
114 changed files with 737 additions and 737 deletions
+2 -2
View File
@@ -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);
}