Reuse document indexes in D&D normalization
This commit is contained in:
@@ -52,12 +52,12 @@ func Less(order shared.SourceRefOrder, left, right dnd.NPCInteraction) bool {
|
||||
|
||||
// ValidSourceRefs reports whether an interaction has non-empty, valid
|
||||
// current-document evidence.
|
||||
func ValidSourceRefs(doc *source.SourceDocument, refs []source.SourceRef) bool {
|
||||
func ValidSourceRefs(index source.DocumentIndex, refs []source.SourceRef) bool {
|
||||
if len(refs) == 0 {
|
||||
return false
|
||||
}
|
||||
for _, ref := range refs {
|
||||
if source.ValidateRef(doc, ref) != nil {
|
||||
if index.ValidateRef(ref) != nil {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user