OSDN Git Service

Prefer C++-style cast.
authorChristian Kamm <christian.d.kamm@nokia.com>
Mon, 30 May 2011 08:27:29 +0000 (10:27 +0200)
committerhjk <qthjk@ovi.com>
Mon, 30 May 2011 12:51:45 +0000 (14:51 +0200)
Change-Id: Id5e300c2e28bc704cbd1ae0d6022be4db8535429
Reviewed-on: http://codereview.qt.nokia.com/203
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk <qthjk@ovi.com>
src/libs/qmljs/qmljstypedescriptionreader.cpp

index 7768f33..c95dc74 100644 (file)
@@ -437,7 +437,7 @@ double TypeDescriptionReader::readNumericBinding(AST::UiScriptBinding *ast)
 int TypeDescriptionReader::readIntBinding(AST::UiScriptBinding *ast)
 {
     double v = readNumericBinding(ast);
-    int i = (int)v;
+    int i = static_cast<int>(v);
 
     if (i != v) {
         addError(ast->firstSourceLocation(), "Expected integer after colon");