helpers: refactor class member vars (#10218)

This commit is contained in:
davc0n
2025-04-30 23:45:20 +02:00
committed by GitHub
parent b8a204c21d
commit 50e1bec85f
63 changed files with 1770 additions and 1769 deletions

View File

@@ -271,21 +271,21 @@ void CWLSurfaceResource::enter(PHLMONITOR monitor) {
if (std::find(enteredOutputs.begin(), enteredOutputs.end(), monitor) != enteredOutputs.end())
return;
if UNLIKELY (!PROTO::outputs.contains(monitor->szName)) {
if UNLIKELY (!PROTO::outputs.contains(monitor->m_name)) {
// can happen on unplug/replug
LOGM(ERR, "enter() called on a non-existent output global");
return;
}
if UNLIKELY (PROTO::outputs.at(monitor->szName)->isDefunct()) {
if UNLIKELY (PROTO::outputs.at(monitor->m_name)->isDefunct()) {
LOGM(ERR, "enter() called on a defunct output global");
return;
}
auto output = PROTO::outputs.at(monitor->szName)->outputResourceFrom(pClient);
auto output = PROTO::outputs.at(monitor->m_name)->outputResourceFrom(pClient);
if UNLIKELY (!output || !output->getResource() || !output->getResource()->resource()) {
LOGM(ERR, "Cannot enter surface {:x} to {}, client hasn't bound the output", (uintptr_t)this, monitor->szName);
LOGM(ERR, "Cannot enter surface {:x} to {}, client hasn't bound the output", (uintptr_t)this, monitor->m_name);
return;
}
@@ -298,10 +298,10 @@ void CWLSurfaceResource::leave(PHLMONITOR monitor) {
if UNLIKELY (std::find(enteredOutputs.begin(), enteredOutputs.end(), monitor) == enteredOutputs.end())
return;
auto output = PROTO::outputs.at(monitor->szName)->outputResourceFrom(pClient);
auto output = PROTO::outputs.at(monitor->m_name)->outputResourceFrom(pClient);
if UNLIKELY (!output) {
LOGM(ERR, "Cannot leave surface {:x} from {}, client hasn't bound the output", (uintptr_t)this, monitor->szName);
LOGM(ERR, "Cannot leave surface {:x} from {}, client hasn't bound the output", (uintptr_t)this, monitor->m_name);
return;
}