summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/xmlpatterns/api/qabstractxmlnodemodel.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/xmlpatterns/api/qabstractxmlnodemodel.h b/src/xmlpatterns/api/qabstractxmlnodemodel.h
index 98148f7..363d6d3 100644
--- a/src/xmlpatterns/api/qabstractxmlnodemodel.h
+++ b/src/xmlpatterns/api/qabstractxmlnodemodel.h
@@ -92,10 +92,8 @@ namespace QPatternist
};
void *pointer() const
{
- /* Constructing to qptrdiff means we avoid warnings.
- */
- char *null = 0;
- return null + qptrdiff(data);
+ // Constructing via qptrdiff avoids warnings:
+ return reinterpret_cast<void*>(qptrdiff(data));
}
Data additionalData;