大更新
This commit is contained in:
@@ -191,6 +191,13 @@ inline void validate_composition_slot_contracts(const Composition_View& view, co
|
||||
validate_composition_view(view);
|
||||
std::vector<std::string> slots;
|
||||
collect_composition_slots(view.body, slots);
|
||||
for(std::size_t index = 0; index < slots.size(); ++index) {
|
||||
for(std::size_t other = index + 1; other < slots.size(); ++other) {
|
||||
if(slots[index] == slots[other]) {
|
||||
throw std::invalid_argument("duplicate composition slot reference: " + slots[index]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for(const auto& slot_name : slots) {
|
||||
const auto iterator = std::find_if(contracts.begin(), contracts.end(), [&](const Composition_Slot_Contract& contract) {
|
||||
return contract.name == slot_name;
|
||||
|
||||
Reference in New Issue
Block a user