Skip to content

Commit b362c82

Browse files
committed
Merge branch 'master' into ExtensibleBuilder
2 parents 3bf9066 + 2594b01 commit b362c82

1 file changed

Lines changed: 27 additions & 4 deletions

File tree

src/vsg/utils/GraphicsPipelineConfigurator.cpp

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -557,8 +557,31 @@ int GraphicsPipelineConfigurator::compare(const Object& rhs_object) const
557557
iterator itr;
558558
iterator end;
559559

560-
explicit IteratorPair(const std::set<std::string>& values) :
561-
itr(values.begin()), end(values.end()) {}
560+
explicit IteratorPair(const ref_ptr<ShaderCompileSettings>& hints)
561+
{
562+
if (hints)
563+
{
564+
itr = hints->defines.begin();
565+
end = hints->defines.end();
566+
}
567+
else
568+
{
569+
itr = end = {};
570+
}
571+
}
572+
573+
explicit IteratorPair(const ref_ptr<DescriptorConfigurator>& config)
574+
{
575+
if (config)
576+
{
577+
itr = config->defines.begin();
578+
end = config->defines.end();
579+
}
580+
else
581+
{
582+
itr = end = {};
583+
}
584+
}
562585

563586
bool valid() const { return itr != end; }
564587
};
@@ -637,8 +660,8 @@ int GraphicsPipelineConfigurator::compare(const Object& rhs_object) const
637660
return irhs.valid() ? -1 : 0;
638661
};
639662

640-
result = local_compare(Iterator(IteratorPair(descriptorConfigurator->defines), IteratorPair(shaderHints->defines)),
641-
Iterator(IteratorPair(rhs.descriptorConfigurator->defines), IteratorPair(rhs.shaderHints->defines)));
663+
result = local_compare(Iterator(IteratorPair(descriptorConfigurator), IteratorPair(shaderHints)),
664+
Iterator(IteratorPair(rhs.descriptorConfigurator), IteratorPair(rhs.shaderHints)));
642665

643666
if (result) return result;
644667

0 commit comments

Comments
 (0)