Agent-Hellboy / Agent-Hellboy/cpp-filetype

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

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.