internal: fix warnings

This commit is contained in:
Vaxry 2023-09-07 16:43:01 +02:00
parent 0be6b03ee9
commit 398e861b55
5 changed files with 6 additions and 7 deletions

View file

@ -706,6 +706,6 @@ void throwError(const std::string& err) {
throw std::runtime_error(err); throw std::runtime_error(err);
} }
std::string sendToLog(uint8_t level, const std::string& s) { void sendToLog(uint8_t level, const std::string& s) {
Debug::log((LogLevel)level, s); Debug::log((LogLevel)level, s);
} }

View file

@ -33,7 +33,7 @@ std::vector<SCallstackFrameInfo> getBacktrace();
void throwError(const std::string& err); void throwError(const std::string& err);
// why, C++. // why, C++.
std::string sendToLog(uint8_t, const std::string&); void sendToLog(uint8_t, const std::string&);
template <typename... Args> template <typename... Args>
std::string getFormat(const std::string& fmt, Args&&... args) { std::string getFormat(const std::string& fmt, Args&&... args) {
std::string fmtdMsg; std::string fmtdMsg;

View file

@ -1193,7 +1193,6 @@ void CInputManager::constrainMouse(SMouse* pMouse, wlr_pointer_constraint_v1* co
if (pMouse->currentConstraint == constraint) if (pMouse->currentConstraint == constraint)
return; return;
const auto PWINDOW = g_pCompositor->getWindowFromSurface(constraint->surface);
const auto MOUSECOORDS = getMouseCoordsInternal(); const auto MOUSECOORDS = getMouseCoordsInternal();
pMouse->hyprListener_commitConstraint.removeCallback(); pMouse->hyprListener_commitConstraint.removeCallback();

View file

@ -404,7 +404,7 @@ bool CToplevelExportProtocolManager::copyFrameShm(SScreencopyFrame* frame, times
} }
// copy pixels // copy pixels
const auto PFORMAT = get_gles2_format_from_drm(format); const auto PFORMAT = gles2FromDRM(format);
if (!PFORMAT) { if (!PFORMAT) {
Debug::log(ERR, "[toplevel_export] Cannot read pixels, unsupported format {:x}", (uintptr_t)PFORMAT); Debug::log(ERR, "[toplevel_export] Cannot read pixels, unsupported format {:x}", (uintptr_t)PFORMAT);
g_pHyprOpenGL->end(); g_pHyprOpenGL->end();

View file

@ -298,7 +298,7 @@ static const struct wlr_gles2_pixel_format formats[] = {
#endif #endif
}; };
static const struct wlr_gles2_pixel_format* get_gles2_format_from_drm(uint32_t fmt) { inline const struct wlr_gles2_pixel_format* gles2FromDRM(uint32_t fmt) {
for (size_t i = 0; i < sizeof(formats) / sizeof(*formats); ++i) { for (size_t i = 0; i < sizeof(formats) / sizeof(*formats); ++i) {
if (formats[i].drm_format == fmt) { if (formats[i].drm_format == fmt) {
return &formats[i]; return &formats[i];