From a25f0ed5d2605e981cdb774fb1734f168910f3a7 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 12 Jul 2016 14:07:49 +0200 Subject: Minor cleanup in location handling Store the line and column in CompiledData::Location as unsigned values. The qmlSourceCoordinate() function(s) already now act as normalizers, mapping values <= 0 to 0 as indicator for a missing/invalid line/column. Valid values start at 1 and therefore there is no need to store negative values in the location structure. Coincidentally this also fixes a bunch of warnings about conversions from signed to unsigned. Change-Id: Ic69ff395d4991989aede695f2e8c58903f1bd2bf Reviewed-by: Lars Knoll --- src/qml/compiler/qv4jsir_p.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/qml/compiler/qv4jsir_p.h') diff --git a/src/qml/compiler/qv4jsir_p.h b/src/qml/compiler/qv4jsir_p.h index a2bd6ad044..2d6d7d728f 100644 --- a/src/qml/compiler/qv4jsir_p.h +++ b/src/qml/compiler/qv4jsir_p.h @@ -1275,9 +1275,9 @@ struct Function { uint isQmlBinding: 1; uint unused : 24; - // Location of declaration in source code (-1 if not specified) - int line; - int column; + // Location of declaration in source code (0 if not specified) + uint line; + uint column; // Qml extension: SmallSet idObjectDependencies; -- cgit v1.2.3