From f1d79eeb1b122c0b8e506f1406cfc4e041a4c9b4 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 28 Jun 2013 12:02:29 +0200 Subject: [PATCH] Fix compilation with clang Change-Id: I5884d8f10d9d864578376964e038fa8e477dbff2 Reviewed-by: Simon Hausmann --- src/qml/qml/v4/qv4internalclass.cpp | 9 ++------- src/qml/qml/v4/qv4internalclass_p.h | 3 +++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/qml/qml/v4/qv4internalclass.cpp b/src/qml/qml/v4/qv4internalclass.cpp index 635b796..128d4b9 100644 --- a/src/qml/qml/v4/qv4internalclass.cpp +++ b/src/qml/qml/v4/qv4internalclass.cpp @@ -55,11 +55,6 @@ uint QV4::qHash(const QV4::InternalClassTransition &t, uint) using namespace QV4; -static bool operator==(const InternalClassTransition &a, const InternalClassTransition &b) -{ - return a.id == b.id && a.flags == b.flags; -} - static const uchar prime_deltas[] = { 0, 0, 1, 3, 1, 5, 3, 3, 1, 9, 7, 5, 3, 9, 25, 3, 1, 21, 3, 21, 7, 15, 9, 5, 3, 29, 15, 0, 0, 0, 0, 0 @@ -156,7 +151,7 @@ InternalClass *InternalClass::changeMember(String *string, PropertyAttributes da return this; - Transition t = { string->identifier, data.flags() }; + Transition t = { string->identifier, (int)data.flags() }; QHash::const_iterator tit = transitions.constFind(t); if (tit != transitions.constEnd()) return tit.value(); @@ -177,7 +172,7 @@ InternalClass *InternalClass::addMember(String *string, PropertyAttributes data, if (propertyTable.lookup(string->identifier) < size) return changeMember(string, data, index); - Transition t = { string->identifier, data.flags() }; + Transition t = { string->identifier, (int)data.flags() }; QHash::const_iterator tit = transitions.constFind(t); if (index) diff --git a/src/qml/qml/v4/qv4internalclass_p.h b/src/qml/qml/v4/qv4internalclass_p.h index 9bc95da..fc6c535 100644 --- a/src/qml/qml/v4/qv4internalclass_p.h +++ b/src/qml/qml/v4/qv4internalclass_p.h @@ -110,6 +110,9 @@ struct InternalClassTransition { Identifier *id; int flags; + + bool operator==(const InternalClassTransition &other) const + { return id == other.id && flags == other.flags; } }; uint qHash(const QV4::InternalClassTransition &t, uint = 0); -- 2.7.4