[Uml-devel] branches/KDE/3.5/kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Sat Aug 13 05:55:12 UTC 2005


SVN commit 448883 by okellogg:

isCommonDataType(): Compute n_types.

 M  +1 -1      model_utils.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/model_utils.cpp #448882:448883
@@ -213,7 +213,6 @@
 }
 
 bool isCommonDataType(QString type) {
-    const int n_types = 12;
     const char *types[] = { "void", "string",
                             "bool", "boolean",
                             "char", "unsigned char",
@@ -222,6 +221,7 @@
                             "long", "unsigned long",
                             "float", "double"
                           };
+    const int n_types = sizeof(types) / sizeof(const char *);
     const QString lcType = type.lower();
     int i = 0;
     for (; i < n_types; i++) {




More information about the umbrello-devel mailing list