Agent-Hellboy / Agent-Hellboy/cpp-filetype

Refactor filetype::match() and others to return std::optional<const Type> instead of nullptr

Aperta
#7 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

With std::optional, the caller is forced to check whether a value is present using methods like has_value() or by directly comparing against std::nullopt. This reduces the risk of dereferencing a null pointer.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.