Fix sonarcube stuff (#6387)

* Fix sonarcube stuff
This commit is contained in:
Kim Kulling
2025-11-10 23:29:03 +01:00
committed by GitHub
parent a4b8943533
commit 34cda45471
6 changed files with 10 additions and 12 deletions

View File

@@ -65,10 +65,9 @@ namespace D3MF {
using OpcPackageRelationshipPtr = std::shared_ptr<OpcPackageRelationship>;
class OpcPackageRelationshipReader {
class OpcPackageRelationshipReader final {
public:
OpcPackageRelationshipReader(XmlParser &parser) :
mRelations() {
explicit OpcPackageRelationshipReader(XmlParser &parser) : mRelations() {
XmlNode root = parser.getRootNode();
ParseRootNode(root);
}

View File

@@ -59,9 +59,10 @@ class Texture2DGroup;
class EmbeddedTexture;
class ColorGroup;
/// @brief his class implements ther 3mf serialization.
class XmlSerializer final {
public:
XmlSerializer(XmlParser &xmlParser);
explicit XmlSerializer(XmlParser &xmlParser);
~XmlSerializer();
void ImportXml(aiScene *scene);

View File

@@ -106,7 +106,7 @@ struct Node : ChunkInfo {
};
~Node() override = default;
Node(Type type) : type(type), unit_scale(1.f){}
explicit Node(Type type) : type(type), unit_scale(1.f){}
Type type;

View File

@@ -341,7 +341,7 @@ struct SubMesh {
/// Contains data for a single mesh
struct Mesh {
Mesh(const std::string &id) :
explicit Mesh(const std::string &id) :
mId(id) {
for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i) {
mNumUVComponents[i] = 2;

View File

@@ -53,15 +53,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <vector>
#include <assimp/DefaultLogger.hpp>
namespace Assimp {
namespace DXF {
namespace Assimp::DXF {
// read pairs of lines, parse group code and value and provide utilities
// to convert the data to the target data type.
// do NOT skip empty lines. In DXF files, they count as valid data.
class LineReader {
public:
LineReader(StreamReaderLE& reader) : splitter(reader,false,true), groupcode( 0 ), end() {
explicit LineReader(StreamReaderLE& reader) : splitter(reader,false,true), groupcode( 0 ), end() {
// empty
}
@@ -203,7 +202,6 @@ struct FileData {
std::vector<Block> blocks;
};
} // namespace DXF
} // namespace Assimp
} // namespace Assimp::DXF
#endif // INCLUDED_DXFHELPER_H

View File

@@ -237,7 +237,7 @@ std::string FBXConverter::MakeUniqueNodeName(const Model *const model, const aiN
/// When a node becomes a child of another node, that node becomes its owner and mOwnership should be released.
struct FBXConverter::PotentialNode {
PotentialNode() : mOwnership(new aiNode), mNode(mOwnership.get()) {}
PotentialNode(const std::string& name) : mOwnership(new aiNode(name)), mNode(mOwnership.get()) {}
explicit PotentialNode(const std::string& name) : mOwnership(new aiNode(name)), mNode(mOwnership.get()) {}
aiNode* operator->() { return mNode; }
std::unique_ptr<aiNode> mOwnership;
aiNode* mNode;