Material: single-argument constructors must be marked as explicit

This commit is contained in:
wmayer
2023-11-02 13:27:59 +01:00
committed by wwmayer
parent 5accd11c62
commit 015c84066d
9 changed files with 23 additions and 23 deletions

View File

@@ -457,11 +457,11 @@ Material::Material(const Material& other)
_allUuids.push_back(*it);
}
for (auto it = other._physical.begin(); it != other._physical.end(); it++) {
MaterialProperty prop = it->second;
MaterialProperty prop(it->second);
_physical[it->first] = std::make_shared<MaterialProperty>(prop);
}
for (auto it = other._appearance.begin(); it != other._appearance.end(); it++) {
MaterialProperty prop = it->second;
MaterialProperty prop(it->second);
_appearance[it->first] = std::make_shared<MaterialProperty>(prop);
}
}
@@ -1330,12 +1330,12 @@ Material& Material::operator=(const Material& other)
// Create copies of the properties rather than modify the originals
_physical.clear();
for (auto it = other._physical.begin(); it != other._physical.end(); it++) {
MaterialProperty prop = it->second;
MaterialProperty prop(it->second);
_physical[it->first] = std::make_shared<MaterialProperty>(prop);
}
_appearance.clear();
for (auto it = other._appearance.begin(); it != other._appearance.end(); it++) {
MaterialProperty prop = it->second;
MaterialProperty prop(it->second);
_appearance[it->first] = std::make_shared<MaterialProperty>(prop);
}