From 4092fcb16a14b9a2a2fc2bc27ffded523cb42d32 Mon Sep 17 00:00:00 2001 From: Peter Heywood Date: Thu, 21 Nov 2024 14:30:49 +0000 Subject: [PATCH] Lint: Suppress or fix cpplint2 warnings --- CPPLINT.cfg | 2 +- include/flamegpu/visualiser/config/AgentStateConfig.h | 1 + include/flamegpu/visualiser/config/ModelConfig.h | 1 + src/flamegpu/visualiser/Draw.cpp | 2 ++ src/flamegpu/visualiser/Entity.cpp | 3 +++ src/flamegpu/visualiser/FLAMEGPU_Visualisation.cpp | 2 ++ src/flamegpu/visualiser/HUD.cpp | 3 +++ src/flamegpu/visualiser/Visualiser.cpp | 5 +++++ src/flamegpu/visualiser/model/Material.cpp | 4 ++++ src/flamegpu/visualiser/multipass/BackBuffer.cpp | 4 ++++ src/flamegpu/visualiser/multipass/FrameBuffer.cpp | 3 +++ src/flamegpu/visualiser/multipass/RenderBuffer.cpp | 2 ++ src/flamegpu/visualiser/shader/DirectionFunction.cpp | 2 ++ src/flamegpu/visualiser/shader/PositionFunction.cpp | 3 ++- src/flamegpu/visualiser/shader/ScaleFunction.cpp | 2 ++ src/flamegpu/visualiser/shader/ShaderCore.cpp | 6 ++++++ src/flamegpu/visualiser/shader/Shaders.cpp | 3 +++ src/flamegpu/visualiser/shader/VertexFunction.cpp | 3 ++- src/flamegpu/visualiser/shader/buffer/BufferCore.cpp | 1 + .../visualiser/shader/buffer/ShaderStorageBuffer.cpp | 2 ++ src/flamegpu/visualiser/shader/buffer/UniformBuffer.cpp | 1 + src/flamegpu/visualiser/shader/lights/LightsBuffer.cpp | 2 ++ src/flamegpu/visualiser/texture/Texture.cpp | 4 ++++ src/flamegpu/visualiser/texture/Texture2D.cpp | 4 ++++ src/flamegpu/visualiser/texture/Texture2D.h | 1 + src/flamegpu/visualiser/texture/Texture2D_Multisample.cpp | 3 +++ src/flamegpu/visualiser/texture/TextureBuffer.cu.cpp | 3 +++ src/flamegpu/visualiser/texture/TextureCubeMap.cpp | 6 ++++++ src/flamegpu/visualiser/ui/Overlay.cpp | 2 ++ src/flamegpu/visualiser/ui/SplashScreen.cpp | 3 +++ src/flamegpu/visualiser/ui/Sprite2D.cpp | 3 +++ src/flamegpu/visualiser/ui/Text.cpp | 4 +++- src/flamegpu/visualiser/util/Resources.cpp | 3 +++ src/flamegpu/visualiser/util/VisException.cpp | 1 + src/flamegpu/visualiser/util/cuda.cu | 1 + src/flamegpu/visualiser/util/fonts.cpp | 3 +++ 36 files changed, 94 insertions(+), 4 deletions(-) diff --git a/CPPLINT.cfg b/CPPLINT.cfg index c566284..963cfda 100644 --- a/CPPLINT.cfg +++ b/CPPLINT.cfg @@ -1,5 +1,5 @@ set noparent linelength=240 -filter=-legal/copyright,-readability/todo,-runtime/references,-build/c++11 +filter=-legal/copyright,-readability/todo,-runtime/references,-build/c++11,-build/c++17,-whitespace/indent_namespace,-whitespace/newline extensions=c++,hpp,cxx,cpp,cuh,hh,h++,h,hxx,cu,cc,c,inl headers=hpp,cuh,hh,h,h++,hxx,inl \ No newline at end of file diff --git a/include/flamegpu/visualiser/config/AgentStateConfig.h b/include/flamegpu/visualiser/config/AgentStateConfig.h index c034756..44be4d1 100644 --- a/include/flamegpu/visualiser/config/AgentStateConfig.h +++ b/include/flamegpu/visualiser/config/AgentStateConfig.h @@ -3,6 +3,7 @@ #include #include +#include #include #include "TexBufferConfig.h" diff --git a/include/flamegpu/visualiser/config/ModelConfig.h b/include/flamegpu/visualiser/config/ModelConfig.h index d273ce3..38fde5c 100644 --- a/include/flamegpu/visualiser/config/ModelConfig.h +++ b/include/flamegpu/visualiser/config/ModelConfig.h @@ -5,6 +5,7 @@ #include #include #include +#include #include "LineConfig.h" #include "PanelConfig.h" diff --git a/src/flamegpu/visualiser/Draw.cpp b/src/flamegpu/visualiser/Draw.cpp index aca0e0f..747cbc4 100644 --- a/src/flamegpu/visualiser/Draw.cpp +++ b/src/flamegpu/visualiser/Draw.cpp @@ -1,6 +1,8 @@ #include "Draw.h" #include +#include +#include #include "flamegpu/visualiser/util/StringUtils.h" diff --git a/src/flamegpu/visualiser/Entity.cpp b/src/flamegpu/visualiser/Entity.cpp index eba1048..b6944a3 100644 --- a/src/flamegpu/visualiser/Entity.cpp +++ b/src/flamegpu/visualiser/Entity.cpp @@ -8,6 +8,9 @@ #include #include #include +#include +#include +#include #include #include diff --git a/src/flamegpu/visualiser/FLAMEGPU_Visualisation.cpp b/src/flamegpu/visualiser/FLAMEGPU_Visualisation.cpp index cfdf9bc..a8d5910 100644 --- a/src/flamegpu/visualiser/FLAMEGPU_Visualisation.cpp +++ b/src/flamegpu/visualiser/FLAMEGPU_Visualisation.cpp @@ -1,6 +1,8 @@ #include "flamegpu/visualiser/FLAMEGPU_Visualisation.h" #include +#include +#include #include "Visualiser.h" diff --git a/src/flamegpu/visualiser/HUD.cpp b/src/flamegpu/visualiser/HUD.cpp index 711e631..16800fa 100644 --- a/src/flamegpu/visualiser/HUD.cpp +++ b/src/flamegpu/visualiser/HUD.cpp @@ -1,5 +1,8 @@ #include "HUD.h" +#include +#include + #include "flamegpu/visualiser/util/warnings.h" DISABLE_WARNING_PUSH diff --git a/src/flamegpu/visualiser/Visualiser.cpp b/src/flamegpu/visualiser/Visualiser.cpp index 016e520..77d76f4 100644 --- a/src/flamegpu/visualiser/Visualiser.cpp +++ b/src/flamegpu/visualiser/Visualiser.cpp @@ -7,6 +7,11 @@ #include #include #include +#include +#include +#include +#include +#include #include diff --git a/src/flamegpu/visualiser/model/Material.cpp b/src/flamegpu/visualiser/model/Material.cpp index d642075..5afd51b 100644 --- a/src/flamegpu/visualiser/model/Material.cpp +++ b/src/flamegpu/visualiser/model/Material.cpp @@ -1,4 +1,8 @@ #include "flamegpu/visualiser/model/Material.h" + +#include +#include + #include "flamegpu/visualiser/texture/Texture2D.h" namespace flamegpu { diff --git a/src/flamegpu/visualiser/multipass/BackBuffer.cpp b/src/flamegpu/visualiser/multipass/BackBuffer.cpp index 9db9ef7..3bc197f 100644 --- a/src/flamegpu/visualiser/multipass/BackBuffer.cpp +++ b/src/flamegpu/visualiser/multipass/BackBuffer.cpp @@ -1,4 +1,8 @@ #include "flamegpu/visualiser/multipass/BackBuffer.h" + +#include +#include + #include namespace flamegpu { diff --git a/src/flamegpu/visualiser/multipass/FrameBuffer.cpp b/src/flamegpu/visualiser/multipass/FrameBuffer.cpp index e3431aa..7133e3b 100644 --- a/src/flamegpu/visualiser/multipass/FrameBuffer.cpp +++ b/src/flamegpu/visualiser/multipass/FrameBuffer.cpp @@ -1,5 +1,8 @@ #include "flamegpu/visualiser/multipass/FrameBuffer.h" +#include +#include + #include "flamegpu/visualiser/texture/Texture2D.h" #include "flamegpu/visualiser/texture/Texture2D_Multisample.h" #include "flamegpu/visualiser/multipass/RenderBuffer.h" diff --git a/src/flamegpu/visualiser/multipass/RenderBuffer.cpp b/src/flamegpu/visualiser/multipass/RenderBuffer.cpp index 526b639..529c928 100644 --- a/src/flamegpu/visualiser/multipass/RenderBuffer.cpp +++ b/src/flamegpu/visualiser/multipass/RenderBuffer.cpp @@ -1,5 +1,7 @@ #include "flamegpu/visualiser/multipass/RenderBuffer.h" +#include + namespace flamegpu { namespace visualiser { diff --git a/src/flamegpu/visualiser/shader/DirectionFunction.cpp b/src/flamegpu/visualiser/shader/DirectionFunction.cpp index 7e1c9dc..efd1046 100644 --- a/src/flamegpu/visualiser/shader/DirectionFunction.cpp +++ b/src/flamegpu/visualiser/shader/DirectionFunction.cpp @@ -1,5 +1,7 @@ #include "flamegpu/visualiser/shader/DirectionFunction.h" +#include +#include #include diff --git a/src/flamegpu/visualiser/shader/PositionFunction.cpp b/src/flamegpu/visualiser/shader/PositionFunction.cpp index 9767a06..19ab25d 100644 --- a/src/flamegpu/visualiser/shader/PositionFunction.cpp +++ b/src/flamegpu/visualiser/shader/PositionFunction.cpp @@ -1,8 +1,9 @@ #include "flamegpu/visualiser/shader/PositionFunction.h" +#include +#include #include - namespace flamegpu { namespace visualiser { diff --git a/src/flamegpu/visualiser/shader/ScaleFunction.cpp b/src/flamegpu/visualiser/shader/ScaleFunction.cpp index 71d434f..9590495 100644 --- a/src/flamegpu/visualiser/shader/ScaleFunction.cpp +++ b/src/flamegpu/visualiser/shader/ScaleFunction.cpp @@ -1,5 +1,7 @@ #include "flamegpu/visualiser/shader/ScaleFunction.h" +#include +#include #include namespace flamegpu { diff --git a/src/flamegpu/visualiser/shader/ShaderCore.cpp b/src/flamegpu/visualiser/shader/ShaderCore.cpp index 7b9c1b6..442417b 100644 --- a/src/flamegpu/visualiser/shader/ShaderCore.cpp +++ b/src/flamegpu/visualiser/shader/ShaderCore.cpp @@ -1,7 +1,13 @@ #include "flamegpu/visualiser/shader/ShaderCore.h" #include // < _splitpath() Windows only, need to rewrite linux ver +#include #include #include +#include +#include +#include +#include +#include #include "flamegpu/visualiser/util/warnings.h" DISABLE_WARNING_PUSH #include diff --git a/src/flamegpu/visualiser/shader/Shaders.cpp b/src/flamegpu/visualiser/shader/Shaders.cpp index 6ff29cd..ef22623 100644 --- a/src/flamegpu/visualiser/shader/Shaders.cpp +++ b/src/flamegpu/visualiser/shader/Shaders.cpp @@ -4,6 +4,9 @@ #include #include #include +#include +#include +#include #include "flamegpu/visualiser/util/warnings.h" diff --git a/src/flamegpu/visualiser/shader/VertexFunction.cpp b/src/flamegpu/visualiser/shader/VertexFunction.cpp index 4460efc..1479128 100644 --- a/src/flamegpu/visualiser/shader/VertexFunction.cpp +++ b/src/flamegpu/visualiser/shader/VertexFunction.cpp @@ -1,7 +1,8 @@ #include "flamegpu/visualiser/shader/VertexFunction.h" #include - +#include +#include namespace flamegpu { namespace visualiser { diff --git a/src/flamegpu/visualiser/shader/buffer/BufferCore.cpp b/src/flamegpu/visualiser/shader/buffer/BufferCore.cpp index 8134831..ecc89ee 100644 --- a/src/flamegpu/visualiser/shader/buffer/BufferCore.cpp +++ b/src/flamegpu/visualiser/shader/buffer/BufferCore.cpp @@ -1,5 +1,6 @@ #include "flamegpu/visualiser/shader/buffer/BufferCore.h" +#include #include #include "flamegpu/visualiser/util/GLcheck.h" diff --git a/src/flamegpu/visualiser/shader/buffer/ShaderStorageBuffer.cpp b/src/flamegpu/visualiser/shader/buffer/ShaderStorageBuffer.cpp index 6bb61b5..8d47f19 100644 --- a/src/flamegpu/visualiser/shader/buffer/ShaderStorageBuffer.cpp +++ b/src/flamegpu/visualiser/shader/buffer/ShaderStorageBuffer.cpp @@ -1,5 +1,7 @@ #include "flamegpu/visualiser/shader/buffer/ShaderStorageBuffer.h" +#include + #include "flamegpu/visualiser/util/GLcheck.h" namespace flamegpu { diff --git a/src/flamegpu/visualiser/shader/buffer/UniformBuffer.cpp b/src/flamegpu/visualiser/shader/buffer/UniformBuffer.cpp index 6bc353f..56a5251 100644 --- a/src/flamegpu/visualiser/shader/buffer/UniformBuffer.cpp +++ b/src/flamegpu/visualiser/shader/buffer/UniformBuffer.cpp @@ -1,6 +1,7 @@ #include "flamegpu/visualiser/shader/buffer/UniformBuffer.h" #include +#include #include "flamegpu/visualiser/util/GLcheck.h" diff --git a/src/flamegpu/visualiser/shader/lights/LightsBuffer.cpp b/src/flamegpu/visualiser/shader/lights/LightsBuffer.cpp index 1a63cdc..91285db 100644 --- a/src/flamegpu/visualiser/shader/lights/LightsBuffer.cpp +++ b/src/flamegpu/visualiser/shader/lights/LightsBuffer.cpp @@ -2,6 +2,8 @@ #include #include +#include +#include #include "flamegpu/visualiser/shader/lights/PointLight.h" #include "flamegpu/visualiser/shader/lights/SpotLight.h" diff --git a/src/flamegpu/visualiser/texture/Texture.cpp b/src/flamegpu/visualiser/texture/Texture.cpp index fb87265..7b06208 100644 --- a/src/flamegpu/visualiser/texture/Texture.cpp +++ b/src/flamegpu/visualiser/texture/Texture.cpp @@ -4,6 +4,10 @@ #include #include +#include +#include +#include +#include #include "flamegpu/visualiser/util/StringUtils.h" #include "flamegpu/visualiser/util/Resources.h" diff --git a/src/flamegpu/visualiser/texture/Texture2D.cpp b/src/flamegpu/visualiser/texture/Texture2D.cpp index f424210..3c56e34 100644 --- a/src/flamegpu/visualiser/texture/Texture2D.cpp +++ b/src/flamegpu/visualiser/texture/Texture2D.cpp @@ -1,6 +1,10 @@ #include "flamegpu/visualiser/texture/Texture2D.h" #include #include +#include +#include +#include +#include #include #include diff --git a/src/flamegpu/visualiser/texture/Texture2D.h b/src/flamegpu/visualiser/texture/Texture2D.h index 516bdc2..6626244 100644 --- a/src/flamegpu/visualiser/texture/Texture2D.h +++ b/src/flamegpu/visualiser/texture/Texture2D.h @@ -6,6 +6,7 @@ #include #include #include +#include #include diff --git a/src/flamegpu/visualiser/texture/Texture2D_Multisample.cpp b/src/flamegpu/visualiser/texture/Texture2D_Multisample.cpp index a4c9e1e..e55a0ea 100644 --- a/src/flamegpu/visualiser/texture/Texture2D_Multisample.cpp +++ b/src/flamegpu/visualiser/texture/Texture2D_Multisample.cpp @@ -1,5 +1,8 @@ #include "flamegpu/visualiser/texture/Texture2D_Multisample.h" +#include +#include + namespace flamegpu { namespace visualiser { diff --git a/src/flamegpu/visualiser/texture/TextureBuffer.cu.cpp b/src/flamegpu/visualiser/texture/TextureBuffer.cu.cpp index a57b1fa..0778ad5 100644 --- a/src/flamegpu/visualiser/texture/TextureBuffer.cu.cpp +++ b/src/flamegpu/visualiser/texture/TextureBuffer.cu.cpp @@ -1,5 +1,8 @@ #include "flamegpu/visualiser/texture/TextureBuffer.h" +#include +#include + namespace flamegpu { namespace visualiser { diff --git a/src/flamegpu/visualiser/texture/TextureCubeMap.cpp b/src/flamegpu/visualiser/texture/TextureCubeMap.cpp index f0d7943..5cfc9ea 100644 --- a/src/flamegpu/visualiser/texture/TextureCubeMap.cpp +++ b/src/flamegpu/visualiser/texture/TextureCubeMap.cpp @@ -1,4 +1,10 @@ #include "flamegpu/visualiser/texture/TextureCubeMap.h" + +#include +#include +#include +#include + #include namespace flamegpu { diff --git a/src/flamegpu/visualiser/ui/Overlay.cpp b/src/flamegpu/visualiser/ui/Overlay.cpp index 86cd110..1d6eb27 100644 --- a/src/flamegpu/visualiser/ui/Overlay.cpp +++ b/src/flamegpu/visualiser/ui/Overlay.cpp @@ -1,5 +1,7 @@ #include "Overlay.h" +#include + #include "flamegpu/visualiser/util/warnings.h" DISABLE_WARNING_PUSH #include diff --git a/src/flamegpu/visualiser/ui/SplashScreen.cpp b/src/flamegpu/visualiser/ui/SplashScreen.cpp index f99a3ed..f5aa320 100644 --- a/src/flamegpu/visualiser/ui/SplashScreen.cpp +++ b/src/flamegpu/visualiser/ui/SplashScreen.cpp @@ -1,6 +1,9 @@ #include "flamegpu/visualiser/ui/SplashScreen.h" +#include +#include #include +#include #include "flamegpu/visualiser/ui/Sprite2D.h" #include "flamegpu/visualiser/ui/Text.h" diff --git a/src/flamegpu/visualiser/ui/Sprite2D.cpp b/src/flamegpu/visualiser/ui/Sprite2D.cpp index d1d1ca5..6ec7d9a 100644 --- a/src/flamegpu/visualiser/ui/Sprite2D.cpp +++ b/src/flamegpu/visualiser/ui/Sprite2D.cpp @@ -1,4 +1,7 @@ #include "Sprite2D.h" + +#include + #include "flamegpu/visualiser/shader/Shaders.h" namespace flamegpu { diff --git a/src/flamegpu/visualiser/ui/Text.cpp b/src/flamegpu/visualiser/ui/Text.cpp index db7e8a4..55fcc00 100644 --- a/src/flamegpu/visualiser/ui/Text.cpp +++ b/src/flamegpu/visualiser/ui/Text.cpp @@ -2,8 +2,10 @@ #include -#include #include +#include +#include +#include #include "flamegpu/visualiser/util/warnings.h" #include "flamegpu/visualiser/util/fonts.h" diff --git a/src/flamegpu/visualiser/util/Resources.cpp b/src/flamegpu/visualiser/util/Resources.cpp index cd3b71b..12a2fa1 100644 --- a/src/flamegpu/visualiser/util/Resources.cpp +++ b/src/flamegpu/visualiser/util/Resources.cpp @@ -1,6 +1,9 @@ #include "flamegpu/visualiser/util/Resources.h" #include "VisException.h" + +#include #include +#include #include #include diff --git a/src/flamegpu/visualiser/util/VisException.cpp b/src/flamegpu/visualiser/util/VisException.cpp index 5d04119..e8182a7 100644 --- a/src/flamegpu/visualiser/util/VisException.cpp +++ b/src/flamegpu/visualiser/util/VisException.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include diff --git a/src/flamegpu/visualiser/util/cuda.cu b/src/flamegpu/visualiser/util/cuda.cu index 85156b1..6655f86 100644 --- a/src/flamegpu/visualiser/util/cuda.cu +++ b/src/flamegpu/visualiser/util/cuda.cu @@ -5,6 +5,7 @@ #include #include +#include #include // operator typeid #include diff --git a/src/flamegpu/visualiser/util/fonts.cpp b/src/flamegpu/visualiser/util/fonts.cpp index 6147fbf..cbb8e87 100644 --- a/src/flamegpu/visualiser/util/fonts.cpp +++ b/src/flamegpu/visualiser/util/fonts.cpp @@ -6,6 +6,7 @@ #include #include +#include namespace flamegpu { namespace visualiser { @@ -130,6 +131,8 @@ std::string findFont(std::initializer_list fontNames, const Generi // https://docs.microsoft.com/en-us/windows/win32/api/dwrite/nn-dwrite-idwritefontcollection #include +#include + namespace flamegpu { namespace visualiser { namespace fonts {