Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3333)

Unified Diff: core/cross/texture.cc

Issue 159168: This fixes a number of things that are warnings in the Mac compiler.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: core/cross/texture.cc
===================================================================
--- core/cross/texture.cc (revision 21208)
+++ core/cross/texture.cc (working copy)
@@ -96,8 +96,8 @@
int dst_width, int dst_height, int dest_mip) {
DCHECK(src_img->image_data());
- int mip_width = std::max(1, width() >> dest_mip);
- int mip_height = std::max(1, height() >> dest_mip);
+ unsigned int mip_width = std::max(1, width() >> dest_mip);
+ unsigned int mip_height = std::max(1, height() >> dest_mip);
// Clip source and destination rectangles to
// source and destination bitmaps.
@@ -123,8 +123,10 @@
// the entire bitmap on dest image, just perform memcpy.
if (src_x == 0 && src_y == 0 && dst_x == 0 && dst_y == 0 &&
src_img->width() == mip_width && src_img->height() == mip_height &&
- src_width == src_img->width() && src_height == src_img->height() &&
- dst_width == mip_width && dst_height == mip_height) {
+ static_cast<unsigned int>(src_width) == src_img->width() &&
+ static_cast<unsigned int>(src_height) == src_img->height() &&
+ static_cast<unsigned int>(dst_width) == mip_width &&
+ static_cast<unsigned int>(dst_height) == mip_height) {
void* data = NULL;
if (!Lock(dest_mip, &data))
return;
@@ -248,7 +250,7 @@
CubeFace dest_face, int dest_mip) {
DCHECK(src_img->image_data());
- int mip_length = std::max(1, edge_length() >> dest_mip);
+ unsigned int mip_length = std::max(1, edge_length() >> dest_mip);
// Clip source and destination rectangles to
// source and destination bitmaps.
@@ -274,8 +276,10 @@
// the entire bitmap on dest image, just perform memcpy.
if (src_x == 0 && src_y == 0 && dst_x == 0 && dst_y == 0 &&
src_img->width() == mip_length && src_img->height() == mip_length &&
- src_width == src_img->width() && src_height == src_img->height() &&
- dst_width == mip_length && dst_height == mip_length) {
+ static_cast<unsigned int>(src_width) == src_img->width() &&
+ static_cast<unsigned int>(src_height) == src_img->height() &&
+ static_cast<unsigned int>(dst_width) == mip_length &&
+ static_cast<unsigned int>(dst_height) == mip_length) {
// get mip data by lock method.
void* data = NULL;
if (!Lock(dest_face, dest_mip, &data))

Powered by Google App Engine
This is Rietveld 408576698