Make error code types nodiscard
This commit is contained in:
@@ -18,7 +18,7 @@ public:
|
||||
/**
|
||||
* @brief Status returned by streaming parse operations.
|
||||
*/
|
||||
enum class ParseStatus {
|
||||
enum class [[nodiscard]] ParseStatus {
|
||||
Incomplete, ///< Parser needs more data to complete parsing
|
||||
Complete, ///< Successfully parsed a complete commit request
|
||||
Error ///< Parse error occurred (check get_parse_error() for details)
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
/**
|
||||
* @brief Result type for one-shot parsing operations.
|
||||
*/
|
||||
enum class ParseResult {
|
||||
enum class [[nodiscard]] ParseResult {
|
||||
Success, ///< Parsing completed successfully
|
||||
InvalidJson, ///< Invalid JSON format or structure
|
||||
MissingField, ///< Required field missing from input
|
||||
|
||||
Reference in New Issue
Block a user