mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 05:25:58 +01:00
internal: fix warnings
This commit is contained in:
parent
0be6b03ee9
commit
398e861b55
5 changed files with 6 additions and 7 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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];
|
||||||
|
|
Loading…
Reference in a new issue