mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2026-03-12 10:41:58 +00:00
GSL + CPP core guidelines changes.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
@@ -15,7 +15,7 @@ void EightBit::Processor::initialise() {
|
||||
|
||||
int EightBit::Processor::run(int limit) {
|
||||
int current = 0;
|
||||
while (powered() && current < limit) {
|
||||
while (GSL_LIKELY(powered()) && current < limit) {
|
||||
current += singleStep();
|
||||
}
|
||||
return current;
|
||||
@@ -35,7 +35,7 @@ void EightBit::Processor::fetchWord(register16_t& output) {
|
||||
}
|
||||
|
||||
int EightBit::Processor::fetchExecute() {
|
||||
if (!powered())
|
||||
return 0;
|
||||
return execute(fetchByte());
|
||||
if (GSL_LIKELY(powered()))
|
||||
return execute(fetchByte());
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user