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

Unified Diff: ui/gfx/icon_util.cc

Issue 11889017: some fixes and warning disables in ui/ for building on win x64 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove stupid code Created 7 years, 11 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
« no previous file with comments | « ui/base/win/hwnd_subclass.cc ('k') | ui/gfx/text_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/icon_util.cc
diff --git a/ui/gfx/icon_util.cc b/ui/gfx/icon_util.cc
index 4f4b4b7c68f576b10d499f67c43a9dc466c56bd7..35d595572fc5cb882e24cc7160aaa064e4d7d253 100644
--- a/ui/gfx/icon_util.cc
+++ b/ui/gfx/icon_util.cc
@@ -297,8 +297,8 @@ bool IconUtil::CreateIconFileFromSkBitmap(const SkBitmap& bitmap,
// If |large_bitmap| was specified, validate its dimension and convert to PNG.
scoped_refptr<base::RefCountedMemory> png_bytes;
if (!large_bitmap.empty()) {
- DCHECK_EQ(256, large_bitmap.width());
- DCHECK_EQ(256, large_bitmap.height());
+ CHECK_EQ(256, large_bitmap.width());
+ CHECK_EQ(256, large_bitmap.height());
png_bytes = gfx::Image(large_bitmap).As1xPNGBytes();
}
@@ -331,7 +331,7 @@ bool IconUtil::CreateIconFileFromSkBitmap(const SkBitmap& bitmap,
std::vector<uint8> buffer(buffer_size);
ICONDIR* icon_dir = reinterpret_cast<ICONDIR*>(&buffer[0]);
icon_dir->idType = kResourceTypeIcon;
- icon_dir->idCount = bitmap_count;
+ icon_dir->idCount = static_cast<WORD>(bitmap_count);
size_t icon_dir_count = bitmap_count - 1; // Note DCHECK(!bitmaps.empty())!
// Increment counts if a PNG entry will be added.
@@ -358,8 +358,8 @@ bool IconUtil::CreateIconFileFromSkBitmap(const SkBitmap& bitmap,
entry->bHeight = 0;
entry->wPlanes = 1;
entry->wBitCount = 32;
- entry->dwBytesInRes = png_bytes->size();
- entry->dwImageOffset = offset;
+ entry->dwBytesInRes = static_cast<DWORD>(png_bytes->size());
+ entry->dwImageOffset = static_cast<DWORD>(offset);
memcpy(&buffer[offset], png_bytes->front(), png_bytes->size());
offset += png_bytes->size();
}
« no previous file with comments | « ui/base/win/hwnd_subclass.cc ('k') | ui/gfx/text_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698