summaryrefslogtreecommitdiffstats
path: root/o3d/core
diff options
context:
space:
mode:
Diffstat (limited to 'o3d/core')
-rw-r--r--o3d/core/cross/bitmap.cc4
-rw-r--r--o3d/core/cross/image_utils.cc5
2 files changed, 5 insertions, 4 deletions
diff --git a/o3d/core/cross/bitmap.cc b/o3d/core/cross/bitmap.cc
index e44f5d9..8069451 100644
--- a/o3d/core/cross/bitmap.cc
+++ b/o3d/core/cross/bitmap.cc
@@ -403,11 +403,11 @@ void Bitmap::DrawImage(const Bitmap& src_img,
void Bitmap::GenerateMips(int source_level, int num_levels) {
- if (source_level >= num_mipmaps() || source_level < 0) {
+ if (source_level >= static_cast<int>(num_mipmaps()) || source_level < 0) {
O3D_ERROR(service_locator()) << "source level out of range.";
return;
}
- if (source_level + num_levels >= num_mipmaps() || num_levels < 0) {
+ if (source_level + num_levels >= static_cast<int>(num_mipmaps()) || num_levels < 0) {
O3D_ERROR(service_locator()) << "num levels out of range.";
return;
}
diff --git a/o3d/core/cross/image_utils.cc b/o3d/core/cross/image_utils.cc
index a9d4112..6d990b8 100644
--- a/o3d/core/cross/image_utils.cc
+++ b/o3d/core/cross/image_utils.cc
@@ -418,8 +418,8 @@ void FilterTexel(unsigned int x,
DCHECK_LE(dst_height, src_height);
DCHECK_LE(x, dst_width);
DCHECK_LE(y, dst_height);
- DCHECK_LE(src_width, src_pitch);
- DCHECK_LE(dst_width, dst_pitch);
+ DCHECK_LE(static_cast<int>(src_width), src_pitch);
+ DCHECK_LE(static_cast<int>(dst_width), dst_pitch);
src_pitch /= components;
dst_pitch /= components;
@@ -625,6 +625,7 @@ bool GenerateMipmap(unsigned int src_width,
}
}
}
+ return true;
}
ImageFileType GetFileTypeFromFilename(const char *filename) {