nullptr instead of 0
This commit is contained in:
@ -91,7 +91,7 @@ int IntDispatcher::report(unsigned int vector) {
|
|||||||
|
|
||||||
ISR* isr = this->map[vector];
|
ISR* isr = this->map[vector];
|
||||||
|
|
||||||
if (isr == 0) {
|
if (isr == nullptr) {
|
||||||
log.error() << "No ISR registered for vector " << vector << endl;
|
log.error() << "No ISR registered for vector " << vector << endl;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -18,14 +18,14 @@
|
|||||||
|
|
||||||
class IntDispatcher {
|
class IntDispatcher {
|
||||||
private:
|
private:
|
||||||
IntDispatcher(const IntDispatcher& copy) = delete; // Verhindere Kopieren
|
|
||||||
|
|
||||||
NamedLogger log;
|
NamedLogger log;
|
||||||
|
|
||||||
enum { size = 256 };
|
enum { size = 256 };
|
||||||
ISR* map[size];
|
ISR* map[size];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
IntDispatcher(const IntDispatcher& copy) = delete; // Verhindere Kopieren
|
||||||
|
|
||||||
// Vektor-Nummern
|
// Vektor-Nummern
|
||||||
enum {
|
enum {
|
||||||
timer = 32,
|
timer = 32,
|
||||||
@ -35,8 +35,8 @@ public:
|
|||||||
|
|
||||||
// Initialisierung der ISR map mit einer Default-ISR.
|
// Initialisierung der ISR map mit einer Default-ISR.
|
||||||
IntDispatcher() : log("IntDis") {
|
IntDispatcher() : log("IntDis") {
|
||||||
for (unsigned int slot = 0; slot < size; slot++) {
|
for (ISR*& slot : map) {
|
||||||
map[slot] = 0;
|
slot = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user