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

Unified Diff: src/spaces.h

Issue 390004: Fix warnings on Win64. (Closed)
Patch Set: Created 11 years, 1 month 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
« src/api.cc ('K') | « src/serialize.cc ('k') | src/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/spaces.h
diff --git a/src/spaces.h b/src/spaces.h
index 9e1d873c99a3bf07de8fa1ef37f4ab32af864f21..75b992ffee1613461378bff92527020dba6fe8d6 100644
--- a/src/spaces.h
+++ b/src/spaces.h
@@ -172,7 +172,7 @@ class Page {
// Returns the offset of a given address to this page.
INLINE(int Offset(Address a)) {
- int offset = a - address();
+ int offset = static_cast<int>(a - address());
ASSERT_PAGE_OFFSET(offset);
return offset;
}
@@ -1116,7 +1116,9 @@ class SemiSpace : public Space {
}
// The offset of an address from the beginning of the space.
- int SpaceOffsetForAddress(Address addr) { return addr - low(); }
+ int SpaceOffsetForAddress(Address addr) {
+ return static_cast<int>(addr - low());
+ }
// If we don't have this here then SemiSpace will be abstract. However
// it should never be called.
@@ -1255,7 +1257,7 @@ class NewSpace : public Space {
}
// Return the allocated bytes in the active semispace.
- virtual int Size() { return top() - bottom(); }
+ virtual int Size() { return static_cast<int>(top() - bottom()); }
// Return the current capacity of a semispace.
int Capacity() {
« src/api.cc ('K') | « src/serialize.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698