@@ -75,10 +75,13 @@ auto find_anchors(const sourcemeta::core::JSON &schema,
75
75
assert (schema.at (" $id" ).is_string ());
76
76
const sourcemeta::core::URI identifier (schema.at (" $id" ).to_string ());
77
77
if (identifier.is_fragment_only ()) {
78
- result.insert ({sourcemeta::core::JSON::String{
79
- identifier.fragment () ? identifier.fragment ().value ()
80
- : " what should we have here?" },
81
- AnchorType::Static});
78
+ result.insert (
79
+ {sourcemeta::core::JSON::String{
80
+ identifier.fragment ()
81
+ .value ()}, // NOLINT(bugprone-unchecked-optional-access):
82
+ // Check for optional is happening
83
+ // inside is_fragment_only()
84
+ AnchorType::Static});
82
85
}
83
86
}
84
87
}
@@ -91,10 +94,13 @@ auto find_anchors(const sourcemeta::core::JSON &schema,
91
94
assert (schema.at (" id" ).is_string ());
92
95
const sourcemeta::core::URI identifier (schema.at (" id" ).to_string ());
93
96
if (identifier.is_fragment_only ()) {
94
- result.insert ({sourcemeta::core::JSON::String{
95
- identifier.fragment () ? identifier.fragment ().value ()
96
- : " what should we have here?" },
97
- AnchorType::Static});
97
+ result.insert (
98
+ {sourcemeta::core::JSON::String{
99
+ identifier.fragment ()
100
+ .value ()}, // NOLINT(bugprone-unchecked-optional-access):
101
+ // Check for optional is happening
102
+ // inside is_fragment_only()
103
+ AnchorType::Static});
98
104
}
99
105
}
100
106
}
0 commit comments