From b51ce3426da234b71165946c419711669ea11638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Wed, 16 Dec 2015 01:33:02 +0100 Subject: [PATCH] Fixed coding style --- src/render/opengl/OpenGLVegetation.cpp | 2 +- src/render/software/GodRaysSampler.cpp | 6 +++--- src/render/software/Rasterizer.cpp | 3 ++- src/render/software/VegetationRasterizer.cpp | 3 ++- src/tests/VegetationRasterizer_Test.cpp | 1 - 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/render/opengl/OpenGLVegetation.cpp b/src/render/opengl/OpenGLVegetation.cpp index ee1acda..e59d50f 100644 --- a/src/render/opengl/OpenGLVegetation.cpp +++ b/src/render/opengl/OpenGLVegetation.cpp @@ -55,7 +55,7 @@ OpenGLVegetation::~OpenGLVegetation() { delete layers_lock; - for (auto &layer: layers) { + for (auto &layer : layers) { delete layer; } layers.clear(); diff --git a/src/render/software/GodRaysSampler.cpp b/src/render/software/GodRaysSampler.cpp index 74de4aa..7bf5e14 100644 --- a/src/render/software/GodRaysSampler.cpp +++ b/src/render/software/GodRaysSampler.cpp @@ -169,9 +169,9 @@ Color GodRaysSampler::apply(const Color &raw, const Color &atmosphered, const Ve inline double GodRaysSampler::getCache(int x, int y, int z) { double *cache = data + z * samples_x * samples_y + y * samples_x + x; if (*cache < 0.0) { - Vector3 location = - Vector3(bounds->getStart().x + sampling_step * to_double(x), bounds->getStart().y + sampling_step * to_double(y), - bounds->getStart().z + sampling_step * to_double(z)); + Vector3 location = Vector3(bounds->getStart().x + sampling_step * to_double(x), + bounds->getStart().y + sampling_step * to_double(y), + bounds->getStart().z + sampling_step * to_double(z)); double unfiltered_power = getRawLight(location, false).getPower(); if (unfiltered_power == 0.0) { *cache = 1.0; diff --git a/src/render/software/Rasterizer.cpp b/src/render/software/Rasterizer.cpp index 15c540a..f47c0a1 100644 --- a/src/render/software/Rasterizer.cpp +++ b/src/render/software/Rasterizer.cpp @@ -32,7 +32,8 @@ struct paysages::software::RenderScanlines { int right; }; -Rasterizer::Rasterizer(SoftwareRenderer *renderer, RenderProgress *progress, unsigned short client_id, const Color &color) +Rasterizer::Rasterizer(SoftwareRenderer *renderer, RenderProgress *progress, unsigned short client_id, + const Color &color) : renderer(renderer), progress(progress), client_id(client_id) { this->color = new Color(color); diff --git a/src/render/software/VegetationRasterizer.cpp b/src/render/software/VegetationRasterizer.cpp index 778f2ce..b2b2ab6 100644 --- a/src/render/software/VegetationRasterizer.cpp +++ b/src/render/software/VegetationRasterizer.cpp @@ -10,7 +10,8 @@ #include "VegetationRenderer.h" #include "RayCastingResult.h" -VegetationRasterizer::VegetationRasterizer(SoftwareRenderer *renderer, RenderProgress *progress, unsigned short client_id) +VegetationRasterizer::VegetationRasterizer(SoftwareRenderer *renderer, RenderProgress *progress, + unsigned short client_id) : TerrainRasterizer(renderer, progress, client_id) { setYOffset(0.5); setColor(Color(0.7, 1.0, 0.7, 0.5)); diff --git a/src/tests/VegetationRasterizer_Test.cpp b/src/tests/VegetationRasterizer_Test.cpp index f0d2188..c2ed959 100644 --- a/src/tests/VegetationRasterizer_Test.cpp +++ b/src/tests/VegetationRasterizer_Test.cpp @@ -19,4 +19,3 @@ TEST(VegetationRasterizer, isUseful) { EXPECT_TRUE(rast.isUseful()); } -