From b592fcbff38a216ad8c79a86ea502b12da4829f3 Mon Sep 17 00:00:00 2001 From: Vladislav Oleshko Date: Wed, 24 Aug 2022 18:57:37 +0300 Subject: [PATCH] Fix formatting --- src/Magnum/Shaders/DistanceFieldVectorGL.cpp | 6 +++--- src/Magnum/Shaders/DistanceFieldVectorGL.h | 6 +++--- src/Magnum/Shaders/FlatGL.cpp | 9 ++++----- src/Magnum/Shaders/FlatGL.h | 6 +++--- src/Magnum/Shaders/PhongGL.cpp | 9 ++++----- src/Magnum/Shaders/PhongGL.h | 6 +++--- src/Magnum/Shaders/VectorGL.cpp | 10 ++++------ src/Magnum/Shaders/VectorGL.h | 6 +++--- src/Magnum/Shaders/VertexColorGL.cpp | 8 +++----- src/Magnum/Shaders/VertexColorGL.h | 6 +++--- 10 files changed, 33 insertions(+), 39 deletions(-) diff --git a/src/Magnum/Shaders/DistanceFieldVectorGL.cpp b/src/Magnum/Shaders/DistanceFieldVectorGL.cpp index a404c5261..2d1dbf70f 100644 --- a/src/Magnum/Shaders/DistanceFieldVectorGL.cpp +++ b/src/Magnum/Shaders/DistanceFieldVectorGL.cpp @@ -162,8 +162,7 @@ template typename DistanceFieldVectorGL::Com return CompileState{std::move(out), std::move(vert), std::move(frag), version}; } -template DistanceFieldVectorGL::DistanceFieldVectorGL(CompileState&& cs) -: DistanceFieldVectorGL{static_cast(std::move(cs))} { +template DistanceFieldVectorGL::DistanceFieldVectorGL(CompileState&& cs): DistanceFieldVectorGL{static_cast(std::move(cs))} { if (id() == 0) return; CORRADE_INTERNAL_ASSERT_OUTPUT(checkLink()); @@ -237,7 +236,8 @@ template typename DistanceFieldVectorGL::Com return compile(flags, 1, 1); } -template DistanceFieldVectorGL::DistanceFieldVectorGL(const Flags flags, UnsignedInt materialCount, UnsignedInt drawCount): DistanceFieldVectorGL{compile(flags, materialCount, drawCount)} {} +template DistanceFieldVectorGL::DistanceFieldVectorGL(const Flags flags, UnsignedInt materialCount, UnsignedInt drawCount): + DistanceFieldVectorGL{compile(flags, materialCount, drawCount)} {} #endif template DistanceFieldVectorGL& DistanceFieldVectorGL::setTransformationProjectionMatrix(const MatrixTypeFor& matrix) { diff --git a/src/Magnum/Shaders/DistanceFieldVectorGL.h b/src/Magnum/Shaders/DistanceFieldVectorGL.h index 2d180249f..067be3383 100644 --- a/src/Magnum/Shaders/DistanceFieldVectorGL.h +++ b/src/Magnum/Shaders/DistanceFieldVectorGL.h @@ -645,13 +645,13 @@ template class MAGNUM_SHADERS_EXPORT DistanceFieldVector }; -template class DistanceFieldVectorGL::CompileState : public DistanceFieldVectorGL { +template class DistanceFieldVectorGL::CompileState: public DistanceFieldVectorGL { private: friend class DistanceFieldVectorGL; - explicit CompileState(NoCreateT) : DistanceFieldVectorGL{NoCreate}, _vert{NoCreate}, _frag{NoCreate} {} + explicit CompileState(NoCreateT): DistanceFieldVectorGL{NoCreate}, _vert{NoCreate}, _frag{NoCreate} {} - CompileState(DistanceFieldVectorGL&& shader, GL::Shader&& vert, GL::Shader&& frag, GL::Version version) : + CompileState(DistanceFieldVectorGL&& shader, GL::Shader&& vert, GL::Shader&& frag, GL::Version version): DistanceFieldVectorGL{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)}, _version{version} {} GL::Shader _vert, _frag; diff --git a/src/Magnum/Shaders/FlatGL.cpp b/src/Magnum/Shaders/FlatGL.cpp index 272964207..11718dc63 100644 --- a/src/Magnum/Shaders/FlatGL.cpp +++ b/src/Magnum/Shaders/FlatGL.cpp @@ -237,8 +237,7 @@ template typename FlatGL::CompileState FlatG return CompileState{std::move(out), std::move(vert), std::move(frag), version}; } -template FlatGL::FlatGL(CompileState&& cs) -: FlatGL{static_cast(std::move(cs))} { +template FlatGL::FlatGL(CompileState&& cs): FlatGL{static_cast(std::move(cs))} { if (id() == 0) return; CORRADE_INTERNAL_ASSERT_OUTPUT(checkLink()); @@ -312,15 +311,15 @@ template FlatGL::FlatGL(CompileState&& cs) static_cast(context); } -template FlatGL::FlatGL(Flags flags) : FlatGL{compile(flags)} {} +template FlatGL::FlatGL(Flags flags): FlatGL{compile(flags)} {} #ifndef MAGNUM_TARGET_GLES2 template typename FlatGL::CompileState FlatGL::compile(Flags flags) { return compile(flags, 1, 1); } -template FlatGL::FlatGL(Flags flags, UnsignedInt materialCount, UnsignedInt drawCount) - : FlatGL{compile(flags, materialCount, drawCount)} {} +template FlatGL::FlatGL(Flags flags, UnsignedInt materialCount, UnsignedInt drawCount): + FlatGL{compile(flags, materialCount, drawCount)} {} #endif template FlatGL::FlatGL(NoInitT) {} diff --git a/src/Magnum/Shaders/FlatGL.h b/src/Magnum/Shaders/FlatGL.h index 6b39cf907..354d43240 100644 --- a/src/Magnum/Shaders/FlatGL.h +++ b/src/Magnum/Shaders/FlatGL.h @@ -1056,13 +1056,13 @@ template class MAGNUM_SHADERS_EXPORT FlatGL: public GL:: #endif }; -template class FlatGL::CompileState : public FlatGL { +template class FlatGL::CompileState: public FlatGL { private: friend class FlatGL; - explicit CompileState(NoCreateT) : FlatGL{NoCreate}, _vert{NoCreate}, _frag{NoCreate} {} + explicit CompileState(NoCreateT): FlatGL{NoCreate}, _vert{NoCreate}, _frag{NoCreate} {} - CompileState(FlatGL&& shader, GL::Shader&& vert, GL::Shader&& frag, GL::Version version) : + CompileState(FlatGL&& shader, GL::Shader&& vert, GL::Shader&& frag, GL::Version version): FlatGL{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)}, _version{version} {} GL::Shader _vert, _frag; diff --git a/src/Magnum/Shaders/PhongGL.cpp b/src/Magnum/Shaders/PhongGL.cpp index c06d396d6..bd8bf9e65 100644 --- a/src/Magnum/Shaders/PhongGL.cpp +++ b/src/Magnum/Shaders/PhongGL.cpp @@ -347,8 +347,7 @@ PhongGL::CompileState PhongGL::compile(const Flags flags, const UnsignedInt ligh return CompileState{std::move(out), std::move(vert), std::move(frag), version}; } -PhongGL::PhongGL(CompileState&& cs) -: PhongGL{static_cast(std::move(cs))} { +PhongGL::PhongGL(CompileState&& cs): PhongGL{static_cast(std::move(cs))} { if (id() == 0) return; CORRADE_INTERNAL_ASSERT_OUTPUT(checkLink()); @@ -464,15 +463,15 @@ PhongGL::PhongGL(CompileState&& cs) static_cast(version); } -PhongGL::PhongGL(Flags flags, UnsignedInt lightCount) : PhongGL{compile(flags, lightCount)} {} +PhongGL::PhongGL(Flags flags, UnsignedInt lightCount): PhongGL{compile(flags, lightCount)} {} #ifndef MAGNUM_TARGET_GLES2 PhongGL::CompileState PhongGL::compile(Flags flags, UnsignedInt lightCount) { return compile(flags, lightCount, 1, 1); } -PhongGL::PhongGL(Flags flags, UnsignedInt lightCount, UnsignedInt materialCount, UnsignedInt drawCount) - : PhongGL{compile(flags, lightCount, materialCount, drawCount)} {} +PhongGL::PhongGL(Flags flags, UnsignedInt lightCount, UnsignedInt materialCount, UnsignedInt drawCount): + PhongGL{compile(flags, lightCount, materialCount, drawCount)} {} #endif PhongGL& PhongGL::setAmbientColor(const Magnum::Color4& color) { diff --git a/src/Magnum/Shaders/PhongGL.h b/src/Magnum/Shaders/PhongGL.h index 860e5f56c..8a06e2ccc 100644 --- a/src/Magnum/Shaders/PhongGL.h +++ b/src/Magnum/Shaders/PhongGL.h @@ -1801,13 +1801,13 @@ class MAGNUM_SHADERS_EXPORT PhongGL: public GL::AbstractShaderProgram { #endif }; -class PhongGL::CompileState : public PhongGL { +class PhongGL::CompileState: public PhongGL { private: friend class PhongGL; - explicit CompileState(NoCreateT) : PhongGL{NoCreate}, _vert{NoCreate}, _frag{NoCreate} {} + explicit CompileState(NoCreateT): PhongGL{NoCreate}, _vert{NoCreate}, _frag{NoCreate} {} - CompileState(PhongGL&& shader, GL::Shader&& vert, GL::Shader&& frag, GL::Version version) : + CompileState(PhongGL&& shader, GL::Shader&& vert, GL::Shader&& frag, GL::Version version): PhongGL{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)}, _version{version} {} GL::Shader _vert, _frag; diff --git a/src/Magnum/Shaders/VectorGL.cpp b/src/Magnum/Shaders/VectorGL.cpp index c443cf714..b52aee517 100644 --- a/src/Magnum/Shaders/VectorGL.cpp +++ b/src/Magnum/Shaders/VectorGL.cpp @@ -164,8 +164,7 @@ template typename VectorGL::CompileState Vec return CompileState{std::move(out), std::move(vert), std::move(frag), version}; } -template VectorGL::VectorGL(CompileState&& cs) -: VectorGL{static_cast(std::move(cs))} { +template VectorGL::VectorGL(CompileState&& cs): VectorGL{static_cast(std::move(cs))} { if (id() == 0) return; CORRADE_INTERNAL_ASSERT_OUTPUT(checkLink()); @@ -230,20 +229,19 @@ template VectorGL::VectorGL(CompileState&& c static_cast(version); } -template VectorGL::VectorGL(Flags flags) : VectorGL{compile(flags)} {} +template VectorGL::VectorGL(Flags flags): VectorGL{compile(flags)} {} #ifndef MAGNUM_TARGET_GLES2 template typename VectorGL::CompileState VectorGL::compile(Flags flags) { return compile(flags, 1, 1); } -template VectorGL::VectorGL(Flags flags, UnsignedInt materialCount, UnsignedInt drawCount) - : VectorGL{compile(flags, materialCount, drawCount)} {} +template VectorGL::VectorGL(Flags flags, UnsignedInt materialCount, UnsignedInt drawCount): + VectorGL{compile(flags, materialCount, drawCount)} {} #endif template VectorGL::VectorGL(NoInitT) {} - template VectorGL& VectorGL::setTransformationProjectionMatrix(const MatrixTypeFor& matrix) { #ifndef MAGNUM_TARGET_GLES2 CORRADE_ASSERT(!(_flags >= Flag::UniformBuffers), diff --git a/src/Magnum/Shaders/VectorGL.h b/src/Magnum/Shaders/VectorGL.h index 232a076d2..74dd27b38 100644 --- a/src/Magnum/Shaders/VectorGL.h +++ b/src/Magnum/Shaders/VectorGL.h @@ -595,13 +595,13 @@ template class MAGNUM_SHADERS_EXPORT VectorGL: public GL #endif }; -template class VectorGL::CompileState : public VectorGL { +template class VectorGL::CompileState: public VectorGL { private: friend class VectorGL; - explicit CompileState(NoCreateT) : VectorGL{NoCreate}, _vert{NoCreate}, _frag{NoCreate} {} + explicit CompileState(NoCreateT): VectorGL{NoCreate}, _vert{NoCreate}, _frag{NoCreate} {} - CompileState(VectorGL&& shader, GL::Shader&& vert, GL::Shader&& frag, GL::Version version) : + CompileState(VectorGL&& shader, GL::Shader&& vert, GL::Shader&& frag, GL::Version version): VectorGL{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)}, _version{version} {} GL::Shader _vert, _frag; diff --git a/src/Magnum/Shaders/VertexColorGL.cpp b/src/Magnum/Shaders/VertexColorGL.cpp index 15ebb2353..d796a8aaa 100644 --- a/src/Magnum/Shaders/VertexColorGL.cpp +++ b/src/Magnum/Shaders/VertexColorGL.cpp @@ -142,8 +142,7 @@ template typename VertexColorGL::CompileStat return CompileState{std::move(out), std::move(vert), std::move(frag), version}; } -template VertexColorGL::VertexColorGL(CompileState&& cs): - VertexColorGL{static_cast(std::move(cs))} { +template VertexColorGL::VertexColorGL(CompileState&& cs): VertexColorGL{static_cast(std::move(cs))} { if (id() == 0) return; CORRADE_INTERNAL_ASSERT_OUTPUT(checkLink()); @@ -200,13 +199,12 @@ template typename VertexColorGL::CompileStat return compile(flags, 1); } -template VertexColorGL::VertexColorGL(Flags flags, UnsignedInt drawCount) - : VertexColorGL{compile(flags, drawCount)} {} +template VertexColorGL::VertexColorGL(Flags flags, UnsignedInt drawCount): + VertexColorGL{compile(flags, drawCount)} {} #endif template VertexColorGL::VertexColorGL(NoInitT) {} - template VertexColorGL& VertexColorGL::setTransformationProjectionMatrix(const MatrixTypeFor& matrix) { #ifndef MAGNUM_TARGET_GLES2 CORRADE_ASSERT(!(_flags >= Flag::UniformBuffers), diff --git a/src/Magnum/Shaders/VertexColorGL.h b/src/Magnum/Shaders/VertexColorGL.h index e674f05a1..988af7811 100644 --- a/src/Magnum/Shaders/VertexColorGL.h +++ b/src/Magnum/Shaders/VertexColorGL.h @@ -443,13 +443,13 @@ template class MAGNUM_SHADERS_EXPORT VertexColorGL: publ #endif }; -template class VertexColorGL::CompileState : public VertexColorGL { +template class VertexColorGL::CompileState: public VertexColorGL { private: friend class VertexColorGL; - explicit CompileState(NoCreateT) : VertexColorGL{NoCreate}, _vert{NoCreate}, _frag{NoCreate} {} + explicit CompileState(NoCreateT): VertexColorGL{NoCreate}, _vert{NoCreate}, _frag{NoCreate} {} - CompileState(VertexColorGL&& shader, GL::Shader&& vert, GL::Shader&& frag, GL::Version version) : + CompileState(VertexColorGL&& shader, GL::Shader&& vert, GL::Shader&& frag, GL::Version version): VertexColorGL{std::move(shader)}, _vert{std::move(vert)}, _frag{std::move(frag)}, _version{version} {} GL::Shader _vert, _frag;