Don't use Optional::hasValue (NFC)
This commit is contained in:
@@ -31,14 +31,14 @@ namespace {
|
||||
/// at position \p Key.
|
||||
void serializeObject(Object &Paren, StringRef Key, Optional<Object> Obj) {
|
||||
if (Obj)
|
||||
Paren[Key] = std::move(Obj.getValue());
|
||||
Paren[Key] = std::move(*Obj);
|
||||
}
|
||||
|
||||
/// Helper function to inject a JSON array \p Array into object \p Paren at
|
||||
/// position \p Key.
|
||||
void serializeArray(Object &Paren, StringRef Key, Optional<Array> Array) {
|
||||
if (Array)
|
||||
Paren[Key] = std::move(Array.getValue());
|
||||
Paren[Key] = std::move(*Array);
|
||||
}
|
||||
|
||||
/// Serialize a \c VersionTuple \p V with the Symbol Graph semantic version
|
||||
|
||||
Reference in New Issue
Block a user