core: Add clang-tidy (#8664)

This adds a .clang-tidy file for us.

It's not a strict requirement to be compliant, but I tuned it to be alright.
This commit is contained in:
Vaxry 2024-12-07 18:51:18 +01:00 committed by GitHub
parent b1e5cc66bd
commit 8bbeee1173
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
118 changed files with 720 additions and 679 deletions

View file

@ -219,7 +219,7 @@ void CLinuxDMABBUFParamsResource::create(uint32_t id) {
return;
}
LOGM(LOG, "Creating a dmabuf, with id {}: size {}, fmt {}, planes {}", id, attrs->size, FormatUtils::drmFormatName(attrs->format), attrs->planes);
LOGM(LOG, "Creating a dmabuf, with id {}: size {}, fmt {}, planes {}", id, attrs->size, NFormatUtils::drmFormatName(attrs->format), attrs->planes);
for (int i = 0; i < attrs->planes; ++i) {
LOGM(LOG, " | plane {}: mod {} fd {} stride {} offset {}", i, attrs->modifier, attrs->fds[i], attrs->strides[i], attrs->offsets[i]);
}
@ -448,7 +448,7 @@ CLinuxDMABufV1Protocol::CLinuxDMABufV1Protocol(const wl_interface* iface, const
.flags = ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_SCANOUT,
.formats = mon->output->getRenderFormats(),
};
tches.push_back(std::make_pair<>(mon, tranche));
tches.emplace_back(std::make_pair<>(mon, tranche));
}
static auto monitorAdded = g_pHookSystem->hookDynamic("monitorAdded", [this](void* self, SCallbackInfo& info, std::any param) {
@ -458,7 +458,7 @@ CLinuxDMABufV1Protocol::CLinuxDMABufV1Protocol(const wl_interface* iface, const
.flags = ZWP_LINUX_DMABUF_FEEDBACK_V1_TRANCHE_FLAGS_SCANOUT,
.formats = pMonitor->output->getRenderFormats(),
};
formatTable->monitorTranches.push_back(std::make_pair<>(pMonitor, tranche));
formatTable->monitorTranches.emplace_back(std::make_pair<>(pMonitor, tranche));
resetFormatTable();
});