diff --git a/src/WallpaperEngine/FileSystem/Adapters/Virtual.h b/src/WallpaperEngine/FileSystem/Adapters/Virtual.h index 4e2d2f3..067e6e5 100644 --- a/src/WallpaperEngine/FileSystem/Adapters/Virtual.h +++ b/src/WallpaperEngine/FileSystem/Adapters/Virtual.h @@ -23,7 +23,7 @@ struct VirtualAdapter final : Adapter { [[nodiscard]] std::filesystem::path physicalPath (const std::filesystem::path& path) const override; void add (const std::filesystem::path& path, const char* data); - void add (const std::filesystem::path& path, const JSON& contents); + void add (const std::filesystem::path& path, const JSON& data); void add (const std::filesystem::path& path, const std::string& data); void add (const std::filesystem::path& path, MemoryStreamSharedPtr stream); diff --git a/src/WallpaperEngine/Render/Drivers/Detectors/X11FullScreenDetector.cpp b/src/WallpaperEngine/Render/Drivers/Detectors/X11FullScreenDetector.cpp index 9c55ebe..cd5998c 100644 --- a/src/WallpaperEngine/Render/Drivers/Detectors/X11FullScreenDetector.cpp +++ b/src/WallpaperEngine/Render/Drivers/Detectors/X11FullScreenDetector.cpp @@ -39,7 +39,7 @@ X11FullScreenDetector::X11FullScreenDetector ( try { // attempt casting to CGLFWOpenGLDriver, this will throw if it's not possible // so we can gracely handle the error - dynamic_cast (this->m_driver); + std::ignore = dynamic_cast (this->m_driver); } catch (std::exception&) { sLog.exception ("X11 FullScreen Detector initialized with the wrong video driver... This is a bug..."); } diff --git a/src/WallpaperEngine/Render/FBOProvider.cpp b/src/WallpaperEngine/Render/FBOProvider.cpp index 5d6a1cc..529b5a2 100644 --- a/src/WallpaperEngine/Render/FBOProvider.cpp +++ b/src/WallpaperEngine/Render/FBOProvider.cpp @@ -44,10 +44,9 @@ std::shared_ptr FBOProvider::alias (const std::string& newName, const std: } std::shared_ptr FBOProvider::find (const std::string& name) const { - const auto it = this->m_fbos.find (name); - - if (it != this->m_fbos.end ()) + if (const auto it = this->m_fbos.find (name); it != this->m_fbos.end ()) { return it->second; + } if (this->m_parent == nullptr) { return nullptr; diff --git a/src/WallpaperEngine/Render/Objects/Effects/CPass.cpp b/src/WallpaperEngine/Render/Objects/Effects/CPass.cpp index d6aba30..4fc2ec1 100644 --- a/src/WallpaperEngine/Render/Objects/Effects/CPass.cpp +++ b/src/WallpaperEngine/Render/Objects/Effects/CPass.cpp @@ -431,12 +431,12 @@ void CPass::setupShaders () { this->m_pass.textures, this->m_override.textures, this->m_override.constants ); - const auto shaders = Shaders::GLSLContext::get ().toGlsl ( + const auto [vertex, fragment] = Shaders::GLSLContext::get ().toGlsl ( this->m_shader->vertex (), this->m_shader->fragment ()); // compile the shaders - const GLuint vertexShaderID = compileShader (shaders.first.c_str (), GL_VERTEX_SHADER); - const GLuint fragmentShaderID = compileShader (shaders.second.c_str (), GL_FRAGMENT_SHADER); + const GLuint vertexShaderID = compileShader (vertex.c_str (), GL_VERTEX_SHADER); + const GLuint fragmentShaderID = compileShader (fragment.c_str (), GL_FRAGMENT_SHADER); // create the final program this->m_programID = glCreateProgram (); // link the shaders together diff --git a/src/WallpaperEngine/Render/Shaders/GLSLContext.cpp b/src/WallpaperEngine/Render/Shaders/GLSLContext.cpp index 1111a60..d25bea8 100644 --- a/src/WallpaperEngine/Render/Shaders/GLSLContext.cpp +++ b/src/WallpaperEngine/Render/Shaders/GLSLContext.cpp @@ -105,15 +105,15 @@ TBuiltInResource BuiltInResource = { .maxTaskWorkGroupSizeZ_NV = 1, .maxMeshViewCountNV = 4, .limits = { - .nonInductiveForLoops = 1, - .whileLoops = 1, - .doWhileLoops = 1, - .generalUniformIndexing = 1, - .generalAttributeMatrixVectorIndexing = 1, - .generalVaryingIndexing = 1, - .generalSamplerIndexing = 1, - .generalVariableIndexing = 1, - .generalConstantMatrixVectorIndexing = 1, + .nonInductiveForLoops = true, + .whileLoops = true, + .doWhileLoops = true, + .generalUniformIndexing = true, + .generalAttributeMatrixVectorIndexing = true, + .generalVaryingIndexing = true, + .generalSamplerIndexing = true, + .generalVariableIndexing = true, + .generalConstantMatrixVectorIndexing = true, } }; diff --git a/src/WallpaperEngine/Render/Shaders/Shader.cpp b/src/WallpaperEngine/Render/Shaders/Shader.cpp index ee88b16..bd59433 100644 --- a/src/WallpaperEngine/Render/Shaders/Shader.cpp +++ b/src/WallpaperEngine/Render/Shaders/Shader.cpp @@ -38,7 +38,6 @@ Shader::Shader ( this->m_fragment.linkToUnit (&this->m_vertex); } - const std::string& Shader::vertex () { return this->m_vertex.compile (); } @@ -59,7 +58,7 @@ const std::map& Shader::getCombos () const { return this->m_combos; } -Shader::ParameterSearchResult Shader::findParameter (const std::string& name) { +Shader::ParameterSearchResult Shader::findParameter (const std::string& name) const { Variables::ShaderVariable* vertex = nullptr; Variables::ShaderVariable* fragment = nullptr; diff --git a/src/WallpaperEngine/Render/Shaders/Shader.h b/src/WallpaperEngine/Render/Shaders/Shader.h index 50b51e1..d2d77c4 100644 --- a/src/WallpaperEngine/Render/Shaders/Shader.h +++ b/src/WallpaperEngine/Render/Shaders/Shader.h @@ -70,7 +70,7 @@ class Shader { * @param name * @return */ - [[nodiscard]] ParameterSearchResult findParameter (const std::string& name); + [[nodiscard]] ParameterSearchResult findParameter (const std::string& name) const; private: /** diff --git a/src/WallpaperEngine/Render/Wallpapers/CVideo.h b/src/WallpaperEngine/Render/Wallpapers/CVideo.h index a9a5cf3..32e507a 100644 --- a/src/WallpaperEngine/Render/Wallpapers/CVideo.h +++ b/src/WallpaperEngine/Render/Wallpapers/CVideo.h @@ -9,7 +9,7 @@ namespace WallpaperEngine::Render::Wallpapers { class CVideo final : public CWallpaper { public: CVideo ( - const Wallpaper& video, RenderContext& context, AudioContext& audioContext, + const Wallpaper& wallpaper, RenderContext& context, AudioContext& audioContext, const WallpaperState::TextureUVsScaling& scalingMode, const uint32_t& clampMode); diff --git a/src/WallpaperEngine/WebBrowser/CEF/WPSchemeHandlerFactory.h b/src/WallpaperEngine/WebBrowser/CEF/WPSchemeHandlerFactory.h index 738aeaa..40a41a6 100644 --- a/src/WallpaperEngine/WebBrowser/CEF/WPSchemeHandlerFactory.h +++ b/src/WallpaperEngine/WebBrowser/CEF/WPSchemeHandlerFactory.h @@ -4,7 +4,7 @@ #include "include/cef_scheme.h" namespace WallpaperEngine::Data::Model { -class Project; +struct Project; } namespace WallpaperEngine::WebBrowser::CEF { diff --git a/tools/linting.sh b/tools/linting.sh index 8d1fd60..175d02a 100755 --- a/tools/linting.sh +++ b/tools/linting.sh @@ -1,4 +1,4 @@ #!/bin/bash shopt -s globstar -clang-tidy --format-style file src/**/*.cpp -p cmake-build-debug \ No newline at end of file +clang-tidy --format-style file src/WallpaperEngine/**/*.cpp src/*.cpp src/Steam/**/*.cpp -p cmake-build-debug \ No newline at end of file