From dbd774fedb21fa55a23a741cc0ecaf1be556e6aa Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 26 Aug 2022 18:02:07 +0200 Subject: [PATCH] simplify a bit of code --- src/debug/Log.cpp | 5 +---- src/render/Shader.cpp | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/debug/Log.cpp b/src/debug/Log.cpp index 67c160bce..403098e48 100644 --- a/src/debug/Log.cpp +++ b/src/debug/Log.cpp @@ -6,10 +6,7 @@ #include void Debug::init(std::string IS) { - if (ISDEBUG) - logFile = "/tmp/hypr/" + IS + "/hyprlandd.log"; - else - logFile = "/tmp/hypr/" + IS + "/hyprland.log"; + logFile = "/tmp/hypr/" + IS + (ISDEBUG ? "/hyprlandd.log" : "/hyprland.log"); } void Debug::wlrLog(wlr_log_importance level, const char* fmt, va_list args) { diff --git a/src/render/Shader.cpp b/src/render/Shader.cpp index d3f2afb20..48f3fdcca 100644 --- a/src/render/Shader.cpp +++ b/src/render/Shader.cpp @@ -14,7 +14,7 @@ GLint CShader::getUniformLocation(const std::string& unif) { CShader::~CShader() { // destroy shader - if (program != 0) { + if (program) { glDeleteProgram(program); } } \ No newline at end of file