Add end-of-line spaces checker

This commit is contained in:
SirLynix
2024-01-26 10:43:00 +01:00
parent 63c61c0827
commit 6757de1be8
90 changed files with 170 additions and 126 deletions

View File

@@ -125,7 +125,7 @@ namespace Nz
class ChipmunkMotorConstraint2D;
using ChipmunkMotorConstraint2DHandle = ObjectHandle<ChipmunkMotorConstraint2D>;
class NAZARA_CHIPMUNKPHYSICS2D_API ChipmunkMotorConstraint2D : public ChipmunkConstraint2D
{
public:
@@ -159,7 +159,7 @@ namespace Nz
class ChipmunkPivotConstraint2D;
using ChipmunkPivotConstraint2DHandle = ObjectHandle<ChipmunkPivotConstraint2D>;
class NAZARA_CHIPMUNKPHYSICS2D_API ChipmunkPivotConstraint2D : public ChipmunkConstraint2D
{
public:
@@ -178,7 +178,7 @@ namespace Nz
class ChipmunkRatchetConstraint2D;
using ChipmunkRatchetConstraint2DHandle = ObjectHandle<ChipmunkRatchetConstraint2D>;
class NAZARA_CHIPMUNKPHYSICS2D_API ChipmunkRatchetConstraint2D : public ChipmunkConstraint2D
{
public:

View File

@@ -64,7 +64,7 @@ namespace Nz
return static_cast<T&>(*m_components[componentIndex]);
}
template<typename T>
const T& ApplicationBase::GetComponent() const
{

View File

@@ -26,7 +26,7 @@ namespace Nz
ApplicationUpdater& operator=(const ApplicationUpdater&) = delete;
ApplicationUpdater& operator=(ApplicationUpdater&&) = delete;
};
template<typename F>
class ApplicationUpdaterFunctor : public ApplicationUpdater
{

View File

@@ -312,7 +312,7 @@ namespace Nz
{
return Color(r / 255.f, g / 255.f, b / 255.f);
}
/*!
* \brief Converts RGBA8 representation to Color (RGBA32F)
* \return Color resulting

View File

@@ -37,7 +37,7 @@ namespace Nz
inline /*constexpr*/ Result<OpenModeFlags, std::string> File::DecodeOpenMode(std::string_view openModeStr)
{
OpenModeFlags openModes = 0;
if (openModeStr.find('r') != std::string_view::npos)
{
openModes |= OpenMode::Read;

View File

@@ -56,7 +56,7 @@ namespace Nz
return OverrideModuleConfig(T{}, parameters);
}
};
template<typename Module, typename... Modules>
template<typename... ModuleConfig>
ModuleTuple<Module, Modules...>::ModuleTuple(const CommandLineParameters& parameters, ModuleConfig&&... configs) :
@@ -97,7 +97,7 @@ namespace Nz
m_modules(CommandLineParameters{}, std::forward<ModuleConfig>(configs)...)
{
}
template<typename... ModuleList>
template<typename... ModuleConfig>
Modules<ModuleList...>::Modules(const CommandLineParameters& parameters, ModuleConfig&&... configs) :

View File

@@ -25,7 +25,7 @@ namespace Nz
{
HandleInner<EndOfStream>(std::forward<Args>(args)...);
}
template<typename EndToken, typename... Args>
void ParameterFile::HandleInner(Args&&... args)
{
@@ -113,7 +113,7 @@ namespace Nz
keyValue.handler = BuildBlockHandler(keyValues, std::forward<Rest>(rest)...);
}
}
template<typename V, typename... Rest>
auto ParameterFile::GetSingleHandler(V&& value, Rest&&... rest) -> ValueHandler
{

View File

@@ -180,7 +180,7 @@ namespace Nz
return true;
}
/*!
* \ingroup math
* \brief Converts the string to number

View File

@@ -75,7 +75,7 @@ namespace Nz
});
}
}
template<typename F>
bool VirtualDirectory::GetDirectoryEntry(std::string_view path, F&& callback)
{
@@ -260,7 +260,7 @@ namespace Nz
{
return m_isUprootAllowed;
}
inline auto VirtualDirectory::StoreDirectory(std::string_view path, std::shared_ptr<VirtualDirectoryResolver> resolver) -> DirectoryEntry&
{
assert(!path.empty());
@@ -318,7 +318,7 @@ namespace Nz
{
return StoreFile(path, std::make_shared<MemoryView>(data, size));
}
template<typename F> bool VirtualDirectory::GetEntryInternal(std::string_view name, bool allowResolve, F&& callback)
{
if (name == ".")

View File

@@ -12,7 +12,7 @@ namespace Nz
{
m_worldInstance = std::make_shared<WorldInstance>(); //< FIXME: Use pools
}
inline GraphicsComponent::GraphicsComponent(std::shared_ptr<InstancedRenderable> renderable, UInt32 renderMask, bool initiallyVisible) :
GraphicsComponent(initiallyVisible)
{

View File

@@ -31,7 +31,7 @@ namespace Nz
class Light;
class PointLight;
class SpotLight;
class NAZARA_GRAPHICS_API ForwardPipelinePass : public FramePipelinePass, TransferInterface
{
public:

View File

@@ -25,7 +25,7 @@ namespace Nz
return inputIndex;
}
inline std::size_t FramePass::AddOutput(std::size_t attachmentId)
{
assert(attachmentId != InvalidAttachmentId);

View File

@@ -34,7 +34,7 @@ namespace Nz
template<> struct TypeToMaterialPropertyType<Vector2<Int32>> { static constexpr MaterialPropertyType PropertyType = MaterialPropertyType::Int2; };
template<> struct TypeToMaterialPropertyType<Vector3<Int32>> { static constexpr MaterialPropertyType PropertyType = MaterialPropertyType::Int3; };
template<> struct TypeToMaterialPropertyType<Vector4<Int32>> { static constexpr MaterialPropertyType PropertyType = MaterialPropertyType::Int4; };
template<> struct TypeToMaterialPropertyType<UInt32> { static constexpr MaterialPropertyType PropertyType = MaterialPropertyType::UInt; };
template<> struct TypeToMaterialPropertyType<Vector2<UInt32>> { static constexpr MaterialPropertyType PropertyType = MaterialPropertyType::UInt2; };
template<> struct TypeToMaterialPropertyType<Vector3<UInt32>> { static constexpr MaterialPropertyType PropertyType = MaterialPropertyType::UInt3; };

View File

@@ -11,7 +11,7 @@ namespace Nz
{
return m_submeshes.size();
}
inline void Model::SetMaterial(std::size_t subMeshIndex, std::shared_ptr<MaterialInstance> material)
{
assert(subMeshIndex < m_submeshes.size());

View File

@@ -23,7 +23,7 @@ namespace Nz
return lightData;
}
// PredefinedPointLightData
constexpr PredefinedPointLightData PredefinedPointLightData::Build()
{

View File

@@ -29,7 +29,7 @@ namespace Nz
OptionValuePropertyHandler& operator=(const OptionValuePropertyHandler&) = delete;
OptionValuePropertyHandler& operator=(OptionValuePropertyHandler&&) = delete;
private:
std::size_t m_propertyIndex;
std::string m_propertyName;

View File

@@ -30,7 +30,7 @@ namespace Nz
UniformValuePropertyHandler& operator=(const UniformValuePropertyHandler&) = delete;
UniformValuePropertyHandler& operator=(UniformValuePropertyHandler&&) = delete;
private:
std::size_t m_propertyIndex;
std::size_t m_offset;

View File

@@ -10,7 +10,7 @@ namespace Nz
RenderTextureBlit(textureSize, std::move(targetTexture), filter, PipelineStage::FragmentShader, MemoryAccess::ShaderRead, TextureLayout::ColorInput)
{
}
RenderTextureBlit::RenderTextureBlit(const Vector2ui& textureSize, std::shared_ptr<Texture> texture, SamplerFilter filter, PipelineStage targetPipelineStage, MemoryAccessFlags targetMemoryFlags, TextureLayout targetLayout) :
m_targetTexture(std::move(texture)),
m_targetMemoryFlags(targetMemoryFlags),

View File

@@ -25,7 +25,7 @@ namespace Nz
class Texture;
class VertexDeclaration;
class WorldInstance;
struct SpriteChainRendererData : public ElementRendererData
{
struct DrawCall

View File

@@ -111,7 +111,7 @@ namespace Nz
private:
std::vector<ChildCollider> m_childs;
};
class NAZARA_JOLTPHYSICS3D_API JoltConvexHullCollider3D final : public JoltCollider3D
{
public:
@@ -122,7 +122,7 @@ namespace Nz
JoltColliderType3D GetType() const override;
};
class NAZARA_JOLTPHYSICS3D_API JoltMeshCollider3D final : public JoltCollider3D
{
public:
@@ -148,7 +148,7 @@ namespace Nz
};
/*********************************** Decorated ******************************************/
class NAZARA_JOLTPHYSICS3D_API JoltTranslatedRotatedCollider3D final : public JoltCollider3D
{
public:
@@ -164,7 +164,7 @@ namespace Nz
private:
std::shared_ptr<JoltCollider3D> m_collider;
};
}
#include <Nazara/JoltPhysics3D/JoltCollider3D.inl>

View File

@@ -612,7 +612,7 @@ namespace Nz
{
return value <= other.value;
}
template<AngleUnit Unit, typename T>
constexpr bool Angle<Unit, T>::operator>(Angle other) const
{

View File

@@ -539,7 +539,7 @@ namespace Nz
return *this;
}
/*!
* \brief Multiplies the lengths of this box with the scalar (the box center doesn't move)
* \return A reference to this box where lengths are the product of these lengths and the scalar

View File

@@ -237,17 +237,17 @@ namespace Nz
m11*matrix.m12 + m12*matrix.m22 + m13*matrix.m32,
m11*matrix.m13 + m12*matrix.m23 + m13*matrix.m33,
T(0.0),
m21*matrix.m11 + m22*matrix.m21 + m23*matrix.m31,
m21*matrix.m12 + m22*matrix.m22 + m23*matrix.m32,
m21*matrix.m13 + m22*matrix.m23 + m23*matrix.m33,
T(0.0),
m31*matrix.m11 + m32*matrix.m21 + m33*matrix.m31,
m31*matrix.m12 + m32*matrix.m22 + m33*matrix.m32,
m31*matrix.m13 + m32*matrix.m23 + m33*matrix.m33,
T(0.0),
m41*matrix.m11 + m42*matrix.m21 + m43*matrix.m31 + matrix.m41,
m41*matrix.m12 + m42*matrix.m22 + m43*matrix.m32 + matrix.m42,
m41*matrix.m13 + m42*matrix.m23 + m43*matrix.m33 + matrix.m43,
@@ -502,7 +502,7 @@ namespace Nz
if (det == T(0.0))
return false;
// http://stackoverflow.com/questions/1148309/inverting-a-4x4-matrix
T inv[16];
inv[0] = m22 * m33 -

View File

@@ -527,7 +527,7 @@ namespace Nz
if (z != quat.z)
return z < quat.z;
}
template<typename T>
constexpr bool Quaternion<T>::operator<=(const Quaternion& quat) const
{
@@ -543,7 +543,7 @@ namespace Nz
if (z != quat.z)
return z <= quat.z;
}
template<typename T>
constexpr bool Quaternion<T>::operator>(const Quaternion& quat) const
{

View File

@@ -513,7 +513,7 @@ namespace Nz
return *this;
}
template<typename T>
constexpr Vector4<T>& Vector4<T>::operator%=(const Vector4& vec)
{

View File

@@ -206,7 +206,7 @@ namespace Nz
m_buffer = std::move(packet.m_buffer);
m_memoryStream = std::move(packet.m_memoryStream);
m_netCode = packet.m_netCode;
///< Redirect memory stream to the moved buffer
if (m_buffer)
{

View File

@@ -30,7 +30,7 @@ namespace Nz
{
m_headers.insert_or_assign(std::move(header), std::move(value));
}
inline bool WebRequest::OnBodyResponse(const char* data, std::size_t length)
{
if (!m_dataCallback)

View File

@@ -84,7 +84,7 @@ namespace Nz
NazaraErrorFmt("unhandled BlendFunc {0:#x})", UnderlyingCast(blendFunc));
return {};
}
inline GLenum ToOpenGL(FaceFilling side)
{
switch (side)

View File

@@ -18,7 +18,7 @@ namespace Nz
return *this;
}
inline void Image::ArrayToRegion(ImageType type, unsigned int baseLayer, unsigned int layerCount, Boxui& region)
{
switch (type)

View File

@@ -21,7 +21,7 @@ namespace Nz
m_skinningMatrixUpdated(false)
{
}
inline Joint::Joint(Joint&& joint) noexcept :
Node(std::move(joint)),
m_inverseBindMatrix(joint.m_inverseBindMatrix),

View File

@@ -406,7 +406,7 @@ namespace Nz
EnsureDerivedUpdate();
return globalScale / m_derivedScale;
}
inline Node& Node::operator=(const Node& node)
{
SetParent(node.m_parent, false, Invalidation::DontInvalidate);

View File

@@ -94,7 +94,7 @@ namespace Nz
RichTextDrawer& operator=(RichTextDrawer&& drawer) noexcept;
static constexpr std::size_t InvalidBlockIndex = std::numeric_limits<std::size_t>::max();
private:
struct Block;

View File

@@ -27,7 +27,7 @@ namespace Nz
template<typename T> SparsePtr<T> GetComponentPtr(VertexComponent component, std::size_t componentIndex = 0);
inline const VertexBuffer* GetVertexBuffer() const;
inline UInt32 GetVertexCount() const;
template<typename T> bool HasComponentOfType(VertexComponent component) const;
void Unmap();

View File

@@ -57,7 +57,7 @@ namespace Nz
static std::vector<Vk::PhysicalDevice> s_physDevices;
static Vk::Instance s_instance;
static ParameterList s_initializationParameters;
};
};
}
#endif // NAZARA_VULKANRENDERER_VULKAN_HPP

View File

@@ -56,7 +56,7 @@ namespace Nz
void InsertDebugLabel(std::string_view label, const Color& color) override;
inline Vk::CommandBuffer& GetCommandBuffer();
void NextSubpass() override;
void PreTransferBarrier() override;

View File

@@ -22,7 +22,7 @@ namespace Nz
public:
Loader() = delete;
~Loader() = delete;
static bool EnumerateInstanceExtensionProperties(std::vector<VkExtensionProperties>* properties, const char* layerName = nullptr);
static bool EnumerateInstanceLayerProperties(std::vector<VkLayerProperties>* properties);

View File

@@ -166,7 +166,7 @@ namespace Nz::Vk
m_surface = VK_NULL_HANDLE;
}
}
inline VkResult Surface::GetLastErrorCode() const
{
return m_lastErrorCode;

View File

@@ -19,7 +19,7 @@ namespace Nz::Vk
public:
struct Image;
Swapchain() = default;
Swapchain(const Swapchain&) = delete;
Swapchain(Swapchain&&) = default;

View File

@@ -60,7 +60,7 @@ namespace Nz
private:
template<typename F> bool DispatchEvent(std::size_t widgetIndex, F&& functor);
void OnEventMouseButtonPressed(const WindowEventHandler* eventHandler, const WindowEvent::MouseButtonEvent& event);
void OnEventMouseButtonRelease(const WindowEventHandler* eventHandler, const WindowEvent::MouseButtonEvent& event);
void OnEventMouseEntered(const WindowEventHandler* eventHandler);

View File

@@ -63,7 +63,7 @@ namespace Nz
bool m_isHovered;
bool m_isPressed;
};
class NAZARA_WIDGETS_API SimpleCheckboxWidgetStyle : public CheckboxWidgetStyle
{
public:
@@ -109,7 +109,7 @@ namespace Nz
entt::entity m_checkEntity;
bool m_isHovered;
};
class NAZARA_WIDGETS_API SimpleImageButtonWidgetStyle : public ImageButtonWidgetStyle
{
public:
@@ -150,7 +150,7 @@ namespace Nz
bool m_isHovered;
bool m_isPressed;
};
class NAZARA_WIDGETS_API SimpleLabelWidgetStyle : public LabelWidgetStyle
{
public:
@@ -179,7 +179,7 @@ namespace Nz
std::shared_ptr<TextSprite> m_textSprite;
entt::entity m_entity;
};
class NAZARA_WIDGETS_API SimpleProgressBarWidgetStyle : public ProgressBarWidgetStyle
{
public:

View File

@@ -127,7 +127,7 @@ namespace Nz
ButtonWidgetStyle& operator=(const ButtonWidgetStyle&) = delete;
ButtonWidgetStyle& operator=(ButtonWidgetStyle&&) = default;
};
class NAZARA_WIDGETS_API CheckboxWidgetStyle : public BaseWidgetStyle
{
public:
@@ -147,7 +147,7 @@ namespace Nz
CheckboxWidgetStyle& operator=(const CheckboxWidgetStyle&) = delete;
CheckboxWidgetStyle& operator=(CheckboxWidgetStyle&&) = default;
};
class NAZARA_WIDGETS_API ImageButtonWidgetStyle : public BaseWidgetStyle
{
public:
@@ -186,7 +186,7 @@ namespace Nz
LabelWidgetStyle& operator=(const LabelWidgetStyle&) = delete;
LabelWidgetStyle& operator=(LabelWidgetStyle&&) = default;
};
class NAZARA_WIDGETS_API ProgressBarWidgetStyle : public BaseWidgetStyle
{
public:
@@ -233,7 +233,7 @@ namespace Nz
ScrollbarWidgetStyle& operator=(const ScrollbarWidgetStyle&) = delete;
ScrollbarWidgetStyle& operator=(ScrollbarWidgetStyle&&) = default;
};
class NAZARA_WIDGETS_API ScrollbarButtonWidgetStyle : public BaseWidgetStyle
{
public: