From e4ff64343c0df1af0f653489735d85ec5de1bd39 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sat, 2 Nov 2013 11:18:08 +0100 Subject: Fix a few more compiler warnings in release builds Change-Id: I826226b7ddd4a74037b5bbe9a4a7322d404f53a9 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlcompiler.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/qml/qml/qqmlcompiler.cpp') diff --git a/src/qml/qml/qqmlcompiler.cpp b/src/qml/qml/qqmlcompiler.cpp index 0ba90aad27..fdbbed0bf8 100644 --- a/src/qml/qml/qqmlcompiler.cpp +++ b/src/qml/qml/qqmlcompiler.cpp @@ -583,8 +583,7 @@ void QQmlCompiler::genLiteralAssignment(QQmlScript::Property *prop, Instruction::StoreTime instr; QTime time = QQmlStringConverters::timeFromString(v->value.asString()); instr.propertyIndex = prop->index; - Q_ASSERT(sizeof(instr.time) == sizeof(QTime)); - ::memcpy(&instr.time, &time, sizeof(QTime)); + instr.time = time.msecsSinceStartOfDay(); output->addInstruction(instr); } break; @@ -595,8 +594,7 @@ void QQmlCompiler::genLiteralAssignment(QQmlScript::Property *prop, QTime time = dateTime.time(); instr.propertyIndex = prop->index; instr.date = dateTime.date().toJulianDay(); - Q_ASSERT(sizeof(instr.time) == sizeof(QTime)); - ::memcpy(&instr.time, &time, sizeof(QTime)); + instr.time = time.msecsSinceStartOfDay(); output->addInstruction(instr); } break; -- cgit v1.2.3