mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fix/suppress signed-unsigned integer conversion warnings.
This commit is contained in:
committed by
Thomas Krijnen
parent
5e0da9725a
commit
84813084d0
@@ -475,7 +475,7 @@ void ColladaSerializer::ColladaExporter::endDocument() {
|
||||
|
||||
if (use_hierarchy)
|
||||
{
|
||||
unsigned parentsNumber = it->parents_.size();
|
||||
size_t parentsNumber = it->parents_.size();
|
||||
bool finished = false;
|
||||
|
||||
// If we have no parent in the stack and the object has no parent, nothing to do : skip the loop
|
||||
@@ -489,14 +489,14 @@ void ColladaSerializer::ColladaExporter::endDocument() {
|
||||
if (serializer->parentStackId.empty()) { scene.addParent(*(it->parents_.at(0))); }
|
||||
else
|
||||
{
|
||||
unsigned diff = parentsNumber - serializer->parentStackId.size();
|
||||
size_t diff = parentsNumber - serializer->parentStackId.size();
|
||||
|
||||
// If we have the wrong parent in the list
|
||||
if (serializer->parentStackId.top() != it->parents_.at(parentsNumber - diff - 1)->id()) {
|
||||
scene.closeParent();
|
||||
} else {
|
||||
// So far we have the right parents, we just need to add the missing ones
|
||||
for (unsigned i = parentsNumber - diff; i < parentsNumber; i++) { scene.addParent(*(it->parents_.at(i))); }
|
||||
for (size_t i = parentsNumber - diff; i < parentsNumber; i++) { scene.addParent(*(it->parents_.at(i))); }
|
||||
|
||||
// if diff == 0, we can leave the loop. In fact we have the right number of parents, and the last one is ok
|
||||
if (diff == 0) { finished = true; }
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
if (!initialized_) {
|
||||
load_();
|
||||
}
|
||||
return attributes_.size();
|
||||
return (unsigned int)attributes_.size();
|
||||
}
|
||||
|
||||
IfcSchema::Type::Enum type() const {
|
||||
|
||||
Reference in New Issue
Block a user