summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-08-09 09:58:40 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-08-09 10:17:21 (GMT)
commitddd2a54224e651ff45af834201eec1be2c56d583 (patch)
tree44e1d560f1e720d34333588b14643d5da44d1b39 /src/declarative/qml
parent4f2f48caae2ae18336bff10bb1e1ab07f2dd4650 (diff)
downloadQt-ddd2a54224e651ff45af834201eec1be2c56d583.zip
Qt-ddd2a54224e651ff45af834201eec1be2c56d583.tar.gz
Qt-ddd2a54224e651ff45af834201eec1be2c56d583.tar.bz2
QtDeclarative: get rid of warnings in public header
warning: use of old-style cast Reviewed-by: brad
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qdeclarativelist.h8
-rw-r--r--src/declarative/qml/qdeclarativeprivate.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/declarative/qml/qdeclarativelist.h b/src/declarative/qml/qdeclarativelist.h
index 399b2a1..c10bc11 100644
--- a/src/declarative/qml/qdeclarativelist.h
+++ b/src/declarative/qml/qdeclarativelist.h
@@ -98,16 +98,16 @@ public:
private:
static void qlist_append(QDeclarativeListProperty *p, T *v) {
- ((QList<T *> *)p->data)->append(v);
+ reinterpret_cast<QList<T *> *>(p->data)->append(v);
}
static int qlist_count(QDeclarativeListProperty *p) {
- return ((QList<T *> *)p->data)->count();
+ return reinterpret_cast<QList<T *> *>(p->data)->count();
}
static T *qlist_at(QDeclarativeListProperty *p, int idx) {
- return ((QList<T *> *)p->data)->at(idx);
+ return reinterpret_cast<QList<T *> *>(p->data)->at(idx);
}
static void qlist_clear(QDeclarativeListProperty *p) {
- return ((QList<T *> *)p->data)->clear();
+ return reinterpret_cast<QList<T *> *>(p->data)->clear();
}
};
#endif
diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h
index cb916bf..d45ddbc 100644
--- a/src/declarative/qml/qdeclarativeprivate.h
+++ b/src/declarative/qml/qdeclarativeprivate.h
@@ -105,7 +105,7 @@ namespace QDeclarativePrivate
template<class From, class To>
struct StaticCastSelectorClass<From, To, sizeof(int)>
{
- static inline int cast() { return (int)((intptr_t)static_cast<To *>((From *)0x10000000)) - 0x10000000; }
+ static inline int cast() { return int(reinterpret_cast<intptr_t>(static_cast<To *>(reinterpret_cast<From *>(0x10000000)))) - 0x10000000; }
};
template<class From, class To>
@@ -119,7 +119,7 @@ namespace QDeclarativePrivate
static inline int cast()
{
- return StaticCastSelectorClass<From, To, sizeof(check((From *)0))>::cast();
+ return StaticCastSelectorClass<From, To, sizeof(check(reinterpret_cast<From *>(0)))>::cast();
}
};