cleanup: Replace find() with C++20 starts_with(), ends_with() and contains() (#3572)

* Replace find() with C++20 starts_with() and ends_with()

* Replace find() with C++20 contains()
This commit is contained in:
Philip Damianik
2023-10-15 20:07:23 +02:00
committed by GitHub
parent 43b39e0bc6
commit 442209942f
14 changed files with 120 additions and 122 deletions

View File

@@ -122,7 +122,7 @@ void CHyprOpenGLImpl::begin(CMonitor* pMonitor, CRegion* pDamage, bool fake) {
m_iWLROutputFb = m_iCurrentOutputFb;
// ensure a framebuffer for the monitor exists
if (m_mMonitorRenderResources.find(pMonitor) == m_mMonitorRenderResources.end() || m_RenderData.pCurrentMonData->primaryFB.m_vSize != pMonitor->vecPixelSize) {
if (!m_mMonitorRenderResources.contains(pMonitor) || m_RenderData.pCurrentMonData->primaryFB.m_vSize != pMonitor->vecPixelSize) {
m_RenderData.pCurrentMonData->stencilTex.allocate();
m_RenderData.pCurrentMonData->primaryFB.m_pStencilTex = &m_RenderData.pCurrentMonData->stencilTex;