First set of C++17/14 changes to the core library

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon
2018-10-27 17:30:23 +01:00
parent 8dbb3eafec
commit 62f3cd717b
14 changed files with 99 additions and 99 deletions
+5 -5
View File
@@ -8,7 +8,7 @@ EightBit::register16_t EightBit::BigEndianProcessor::getWord() {
const auto high = BUS().read();
++BUS().ADDRESS();
const auto low = BUS().read();
return register16_t(low, high);
return { low, high };
}
void EightBit::BigEndianProcessor::setWord(const register16_t value) {
@@ -21,7 +21,7 @@ EightBit::register16_t EightBit::BigEndianProcessor::getWordPaged(const uint8_t
const auto high = getBytePaged(page, offset);
++BUS().ADDRESS().low;
const auto low = BUS().read();
return register16_t(low, high);
return { low, high };
}
void EightBit::BigEndianProcessor::setWordPaged(const uint8_t page, const uint8_t offset, const register16_t value) {
@@ -33,7 +33,7 @@ void EightBit::BigEndianProcessor::setWordPaged(const uint8_t page, const uint8_
EightBit::register16_t EightBit::BigEndianProcessor::fetchWord() {
const auto high = fetchByte();
const auto low = fetchByte();
return register16_t(low, high);
return { low, high };
}
void EightBit::BigEndianProcessor::pushWord(const register16_t value) {
@@ -44,13 +44,13 @@ void EightBit::BigEndianProcessor::pushWord(const register16_t value) {
EightBit::register16_t EightBit::BigEndianProcessor::popWord() {
const auto high = pop();
const auto low = pop();
return register16_t(low, high);
return { low, high };
}
EightBit::register16_t EightBit::BigEndianProcessor::peekWord(const register16_t address) {
const auto high = BUS().peek(address);
const auto low = BUS().peek(address + 1);
return register16_t(low, high);
return { low, high };
}
void EightBit::BigEndianProcessor::pokeWord(const register16_t address, const register16_t value) {
+2 -2
View File
@@ -10,9 +10,9 @@
uint8_t EightBit::Bus::read() {
ReadingByte.fire(EventArgs::empty());
DATA() = reference();
const auto returned = DATA() = reference();
ReadByte.fire(EventArgs::empty());
return DATA();
return returned;
}
void EightBit::Bus::write() {
+5 -5
View File
@@ -8,7 +8,7 @@ EightBit::register16_t EightBit::LittleEndianProcessor::getWord() {
const auto low = BUS().read();
++BUS().ADDRESS();
const auto high = BUS().read();
return register16_t(low, high);
return { low, high };
}
void EightBit::LittleEndianProcessor::setWord(const register16_t value) {
@@ -21,7 +21,7 @@ EightBit::register16_t EightBit::LittleEndianProcessor::getWordPaged(const uint8
const auto low = getBytePaged(page, offset);
++BUS().ADDRESS().low;
const auto high = BUS().read();
return register16_t(low, high);
return { low, high };
}
void EightBit::LittleEndianProcessor::setWordPaged(const uint8_t page, const uint8_t offset, const register16_t value) {
@@ -33,7 +33,7 @@ void EightBit::LittleEndianProcessor::setWordPaged(const uint8_t page, const uin
EightBit::register16_t EightBit::LittleEndianProcessor::fetchWord() {
const auto low = fetchByte();
const auto high = fetchByte();
return register16_t(low, high);
return { low, high };
}
void EightBit::LittleEndianProcessor::pushWord(const register16_t value) {
@@ -44,13 +44,13 @@ void EightBit::LittleEndianProcessor::pushWord(const register16_t value) {
EightBit::register16_t EightBit::LittleEndianProcessor::popWord() {
const auto low = pop();
const auto high = pop();
return register16_t(low, high);
return { low, high };
}
EightBit::register16_t EightBit::LittleEndianProcessor::peekWord(const register16_t address) {
const auto low = BUS().peek(address);
const auto high = BUS().peek(address + 1);
return register16_t(low, high);
return { low, high };
}
void EightBit::LittleEndianProcessor::pokeWord(const register16_t address, const register16_t value) {