Skip to content

Commit 1cd208b

Browse files
committed
Some cleanups.
1 parent f8c998c commit 1cd208b

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

include/nbl/asset/IDescriptorSetLayout.h

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -313,27 +313,10 @@ class IDescriptorSetLayout : public virtual core::IReferenceCounted
313313
if (!areRedirectsEqual(m_mutableSamplerRedirect, _other->m_mutableSamplerRedirect))
314314
return false;
315315

316-
if (!m_samplers && !_other->m_samplers)
317-
{
318-
return true;
319-
}
320-
else if (!m_samplers || !_other->m_samplers)
321-
{
322-
return false;
323-
}
316+
if (m_samplers && _other->m_samplers)
317+
return std::equal(m_samplers->begin(), m_samplers->end(), _other->m_samplers->begin(), _other->m_samplers->end());
324318
else
325-
{
326-
const auto samplerCount = m_samplers->size();
327-
if (samplerCount != _other->m_samplers->size())
328-
return false;
329-
330-
for (uint32_t i = 0u; i < samplerCount; ++i)
331-
{
332-
if (m_samplers->begin()[i] != _other->m_samplers->begin()[i])
333-
return false;
334-
}
335-
return true;
336-
}
319+
return !m_samplers && !_other->m_samplers;
337320
}
338321

339322
inline uint32_t getTotalMutableSamplerCount() const { return m_mutableSamplerRedirect.getTotalCount(); }

0 commit comments

Comments
 (0)