Fix/suppress signed-unsigned integer conversion warnings.

This commit is contained in:
Stinkfist0
2017-06-05 18:53:57 +03:00
committed by Thomas Krijnen
parent 5e0da9725a
commit 84813084d0
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -475,7 +475,7 @@ void ColladaSerializer::ColladaExporter::endDocument() {
if (use_hierarchy) if (use_hierarchy)
{ {
unsigned parentsNumber = it->parents_.size(); size_t parentsNumber = it->parents_.size();
bool finished = false; bool finished = false;
// If we have no parent in the stack and the object has no parent, nothing to do : skip the loop // 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))); } if (serializer->parentStackId.empty()) { scene.addParent(*(it->parents_.at(0))); }
else else
{ {
unsigned diff = parentsNumber - serializer->parentStackId.size(); size_t diff = parentsNumber - serializer->parentStackId.size();
// If we have the wrong parent in the list // If we have the wrong parent in the list
if (serializer->parentStackId.top() != it->parents_.at(parentsNumber - diff - 1)->id()) { if (serializer->parentStackId.top() != it->parents_.at(parentsNumber - diff - 1)->id()) {
scene.closeParent(); scene.closeParent();
} else { } else {
// So far we have the right parents, we just need to add the missing ones // 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, 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; } if (diff == 0) { finished = true; }
+1 -1
View File
@@ -85,7 +85,7 @@ public:
if (!initialized_) { if (!initialized_) {
load_(); load_();
} }
return attributes_.size(); return (unsigned int)attributes_.size();
} }
IfcSchema::Type::Enum type() const { IfcSchema::Type::Enum type() const {