Conda: ssize_t is a POSIX type and thus not necessarily defined on Windows. Currently this causes build failures with Conda + Py3.10.

The solution is to get rid off all occurrences of ssize_t in FreeCAD code
This commit is contained in:
wmayer
2022-05-17 11:43:40 +02:00
parent 06515cd340
commit d0f98bf45c
4 changed files with 9 additions and 9 deletions

View File

@@ -165,13 +165,13 @@ void ViewProviderShapeBinder::highlightReferences(const bool on, bool /*auxiliar
if (e.compare(0, 4, "Edge") == 0) {
int idx = std::stoi(e.substr(4)) - 1;
assert(idx >= 0);
if (idx < (ssize_t)lcolors.size())
if (idx < static_cast<int>(lcolors.size()))
lcolors[idx] = App::Color(1.0, 0.0, 1.0); // magenta
}
else if (e.compare(0, 4, "Face") == 0) {
int idx = std::stoi(e.substr(4)) - 1;
assert(idx >= 0);
if (idx < (ssize_t)fcolors.size())
if (idx < static_cast<int>(fcolors.size()))
fcolors[idx] = App::Color(1.0, 0.0, 1.0); // magenta
}
}