mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2024-11-16 22:25:59 +01:00
Adjust to match modern c++ style
This commit is contained in:
parent
8e544370d9
commit
be66d710b3
1 changed files with 6 additions and 4 deletions
|
@ -136,10 +136,12 @@ void CHyprpaper::recheckMonitor(SMonitor* pMonitor) {
|
|||
zwlr_layer_surface_v1_ack_configure(pMonitor->pCurrentLayerSurface->pLayerSurface, pMonitor->configureSerial);
|
||||
|
||||
int XCURSOR_SIZE = 24;
|
||||
if (getenv("XCURSOR_SIZE") != NULL) {
|
||||
char *endptr;
|
||||
XCURSOR_SIZE = strtol(getenv("XCURSOR_SIZE"), &endptr, 10);
|
||||
if (*endptr || XCURSOR_SIZE <= 0) {
|
||||
if (const auto CURSORSIZENV = getenv("XCURSOR_SIZE"); CURSORSIZENV) {
|
||||
try {
|
||||
if (XCURSOR_SIZE = std::stoi(CURSORSIZENV); XCURSOR_SIZE <= 0) {
|
||||
throw std::exception();
|
||||
}
|
||||
} catch (...) {
|
||||
Debug::log(WARN, "XCURSOR_SIZE environment variable is set incorrectly");
|
||||
XCURSOR_SIZE = 24;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue