aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-11-25 15:08:19 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-26 09:48:10 +0100
commitf4c91ae691fb9ca0b7fae7a0ec8c493d2c18fa0c (patch)
tree2f79b07de5d767b7f21f84ed461ca999ddc382ba /src/qml/jsruntime
parent93304429cf127c384864a0f893d84dee4ae22296 (diff)
Fix MSVC-64-warnings about truncation of integers.
Change-Id: Ib92ce4b7e42061bb1892957f04cbfc1fcfe43615 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r--src/qml/jsruntime/qv4mm.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4mm.cpp b/src/qml/jsruntime/qv4mm.cpp
index 6f1e48681c..0b15588ed4 100644
--- a/src/qml/jsruntime/qv4mm.cpp
+++ b/src/qml/jsruntime/qv4mm.cpp
@@ -302,7 +302,7 @@ Managed *MemoryManager::alloc(std::size_t size)
allocSize = roundUpToMultipleOf(WTF::pageSize(), allocSize);
Data::Chunk allocation;
allocation.memory = PageAllocation::allocate(allocSize, OSAllocator::JSGCHeapPages);
- allocation.chunkSize = size;
+ allocation.chunkSize = int(size);
m_d->heapChunks.append(allocation);
std::sort(m_d->heapChunks.begin(), m_d->heapChunks.end());
char *chunk = (char *)allocation.memory.base();
@@ -320,8 +320,9 @@ Managed *MemoryManager::alloc(std::size_t size)
}
*last = 0;
m = m_d->smallItems[pos];
- m_d->availableItems[pos] += allocation.memory.size()/size - 1;
- m_d->totalItems += allocation.memory.size()/size - 1;
+ const size_t increase = allocation.memory.size()/size - 1;
+ m_d->availableItems[pos] += uint(increase);
+ m_d->totalItems += int(increase);
#ifdef V4_USE_VALGRIND
VALGRIND_MAKE_MEM_NOACCESS(allocation.memory, allocation.chunkSize);
#endif