aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4jsir_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2016-07-12 14:07:49 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2016-07-13 13:43:33 +0000
commita25f0ed5d2605e981cdb774fb1734f168910f3a7 (patch)
tree1e4da1d86bbc0653cdb1dba8051339a7b06f72f3 /src/qml/compiler/qv4jsir_p.h
parent36d4501a08b1c8708136d3636236a1c6256fbcea (diff)
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 <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4jsir_p.h')
-rw-r--r--src/qml/compiler/qv4jsir_p.h6
1 files changed, 3 insertions, 3 deletions
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<int> idObjectDependencies;