mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-09-11 21:27:20 +03:00
internal: fix warnings
This commit is contained in:
parent
0be6b03ee9
commit
398e861b55
@ -590,8 +590,8 @@ int64_t getPPIDof(int64_t pid) {
|
||||
|
||||
return 0;
|
||||
#else
|
||||
std::string dir = "/proc/" + std::to_string(pid) + "/status";
|
||||
FILE* infile;
|
||||
std::string dir = "/proc/" + std::to_string(pid) + "/status";
|
||||
FILE* infile;
|
||||
|
||||
infile = fopen(dir.c_str(), "r");
|
||||
if (!infile)
|
||||
@ -706,6 +706,6 @@ void throwError(const std::string& 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);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ std::vector<SCallstackFrameInfo> getBacktrace();
|
||||
void throwError(const std::string& err);
|
||||
|
||||
// why, C++.
|
||||
std::string sendToLog(uint8_t, const std::string&);
|
||||
void sendToLog(uint8_t, const std::string&);
|
||||
template <typename... Args>
|
||||
std::string getFormat(const std::string& fmt, Args&&... args) {
|
||||
std::string fmtdMsg;
|
||||
|
@ -1193,7 +1193,6 @@ void CInputManager::constrainMouse(SMouse* pMouse, wlr_pointer_constraint_v1* co
|
||||
if (pMouse->currentConstraint == constraint)
|
||||
return;
|
||||
|
||||
const auto PWINDOW = g_pCompositor->getWindowFromSurface(constraint->surface);
|
||||
const auto MOUSECOORDS = getMouseCoordsInternal();
|
||||
|
||||
pMouse->hyprListener_commitConstraint.removeCallback();
|
||||
|
@ -404,7 +404,7 @@ bool CToplevelExportProtocolManager::copyFrameShm(SScreencopyFrame* frame, times
|
||||
}
|
||||
|
||||
// copy pixels
|
||||
const auto PFORMAT = get_gles2_format_from_drm(format);
|
||||
const auto PFORMAT = gles2FromDRM(format);
|
||||
if (!PFORMAT) {
|
||||
Debug::log(ERR, "[toplevel_export] Cannot read pixels, unsupported format {:x}", (uintptr_t)PFORMAT);
|
||||
g_pHyprOpenGL->end();
|
||||
|
@ -298,7 +298,7 @@ static const struct wlr_gles2_pixel_format formats[] = {
|
||||
#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) {
|
||||
if (formats[i].drm_format == fmt) {
|
||||
return &formats[i];
|
||||
|
Loading…
Reference in New Issue
Block a user