fix some warnings
diff --git a/include/rive/relative_local_asset_resolver.hpp b/include/rive/relative_local_asset_resolver.hpp
index a3d1db9..598a5b7 100644
--- a/include/rive/relative_local_asset_resolver.hpp
+++ b/include/rive/relative_local_asset_resolver.hpp
@@ -28,7 +28,7 @@
FILE* fp = fopen(filename.c_str(), "r");
fseek(fp, 0, SEEK_END);
- auto length = ftell(fp);
+ const size_t length = ftell(fp);
fseek(fp, 0, SEEK_SET);
uint8_t* bytes = new uint8_t[length];
if (fread(bytes, 1, length, fp) == length) {
diff --git a/src/animation/blend_animation_direct.cpp b/src/animation/blend_animation_direct.cpp
index ab82fe9..1ebc63d 100644
--- a/src/animation/blend_animation_direct.cpp
+++ b/src/animation/blend_animation_direct.cpp
@@ -21,8 +21,7 @@
}
// Make sure the inputId doesn't overflow the input buffer.
- if (inputId() < 0 ||
- inputId() >= stateMachineImporter->stateMachine()->inputCount())
+ if ((size_t)inputId() >= stateMachineImporter->stateMachine()->inputCount())
{
return StatusCode::InvalidObject;
}
@@ -31,4 +30,4 @@
return StatusCode::InvalidObject;
}
return Super::import(importStack);
-}
\ No newline at end of file
+}
diff --git a/src/animation/blend_state_1d.cpp b/src/animation/blend_state_1d.cpp
index d8506cd..497790c 100644
--- a/src/animation/blend_state_1d.cpp
+++ b/src/animation/blend_state_1d.cpp
@@ -20,7 +20,7 @@
// editor does too.
if (inputId() >= 0) {
// Make sure the inputId doesn't overflow the input buffer.
- if (inputId() >= stateMachineImporter->stateMachine()->inputCount()) {
+ if ((size_t)inputId() >= stateMachineImporter->stateMachine()->inputCount()) {
return StatusCode::InvalidObject;
}
auto input =
@@ -30,4 +30,4 @@
}
}
return Super::import(importStack);
-}
\ No newline at end of file
+}
diff --git a/src/shapes/image.cpp b/src/shapes/image.cpp
index 78d7204..05da6ef 100644
--- a/src/shapes/image.cpp
+++ b/src/shapes/image.cpp
@@ -41,7 +41,7 @@
}
void Image::assets(const std::vector<FileAsset*>& assets) {
- if (assetId() < 0 || assetId() >= assets.size()) {
+ if ((size_t)assetId() >= assets.size()) {
return;
}
auto asset = assets[assetId()];