Refactor: Update integer type usage

This updates the usage of integer types in code I wrote according to our new style guides.

Major changes:
* Use signed instead of unsigned integers in many places.
* C++ containers in blenlib use `int64_t` for size and indices now (instead of `uint`).
* Hash values for C++ containers are 64 bit wide now (instead of 32 bit).

I do hope that I broke no builds, but it is quite likely that some compiler reports
slightly different errors. Please let me know when there are any errors. If the fix
is small, feel free to commit it yourself.
I compiled successfully on linux with gcc and on windows.
This commit is contained in:
Jacques Lucke
2020-07-20 12:16:20 +02:00
parent 686ab4c940
commit 8cbbdedaf4
87 changed files with 1277 additions and 1284 deletions

View File

@@ -106,7 +106,7 @@ class MFNetworkTreeMap {
void add(Span<const DInputSocket *> dsockets, Span<fn::MFInputSocket *> sockets)
{
assert_same_size(dsockets, sockets);
for (uint i : dsockets.index_range()) {
for (int i : dsockets.index_range()) {
this->add(*dsockets[i], *sockets[i]);
}
}
@@ -114,7 +114,7 @@ class MFNetworkTreeMap {
void add(Span<const DOutputSocket *> dsockets, Span<fn::MFOutputSocket *> sockets)
{
assert_same_size(dsockets, sockets);
for (uint i : dsockets.index_range()) {
for (int i : dsockets.index_range()) {
this->add(*dsockets[i], *sockets[i]);
}
}
@@ -133,7 +133,7 @@ class MFNetworkTreeMap {
void add_try_match(Span<const DSocket *> dsockets, Span<fn::MFSocket *> sockets)
{
uint used_sockets = 0;
int used_sockets = 0;
for (const DSocket *dsocket : dsockets) {
if (!dsocket->is_available()) {
continue;