aboutsummaryrefslogtreecommitdiffstats
path: root/libpyside
diff options
context:
space:
mode:
authorMatthew Woehlke <matthew.woehlke@kitware.com>2013-08-07 13:30:42 -0400
committerJohn Ehresman <jpe@wingware.com>2014-04-15 23:16:44 +0200
commit79d3792cae3f2b6e97ee4f41974d51dfec94a9bc (patch)
tree099aae7b0920c8db13dd082ada5a517099ec4dee /libpyside
parent80a58c4b0bdf0f3273957c72b3a77f4fae442432 (diff)
Avoid narrowing conversion
Add explicit casts when initializing an int[] using {}'s, as required by C++11 to be "well formed". This fixes the only (current) -Wnarrowing warning. Change-Id: I7f190549a8a54a9061678a926d5478256c2084be Reviewed-by: John Ehresman <jpe@wingware.com>
Diffstat (limited to 'libpyside')
-rw-r--r--libpyside/dynamicqmetaobject.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/libpyside/dynamicqmetaobject.cpp b/libpyside/dynamicqmetaobject.cpp
index 4f9af320c..e88e3dfdf 100644
--- a/libpyside/dynamicqmetaobject.cpp
+++ b/libpyside/dynamicqmetaobject.cpp
@@ -527,14 +527,14 @@ int DynamicQMetaObject::DynamicQMetaObjectPrivate::createMetaData(QMetaObject* m
uint n_methods = m_methods.size();
uint n_properties = m_properties.size();
uint n_info = m_info.size();
- int header[] = {3, // revision
- 0, // class name index in m_metadata
- n_info, 0, // classinfo and classinfo index
- n_methods, 0, // method count and method list index
- n_properties, 0, // prop count and prop indexes
- 0, 0, // enum count and enum index
- 0, 0, // constructors
- 0}; // flags
+ int header[] = {3, // revision
+ 0, // class name index in m_metadata
+ int(n_info), 0, // classinfo and classinfo index
+ int(n_methods), 0, // method count and method list index
+ int(n_properties), 0, // prop count and prop indexes
+ 0, 0, // enum count and enum index
+ 0, 0, // constructors
+ 0}; // flags
const int HEADER_LENGHT = sizeof(header)/sizeof(int);