diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2016-07-12 14:07:49 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2016-07-13 13:43:33 +0000 |
commit | a25f0ed5d2605e981cdb774fb1734f168910f3a7 (patch) | |
tree | 1e4da1d86bbc0653cdb1dba8051339a7b06f72f3 /src/qml/compiler/qv4compileddata_p.h | |
parent | 36d4501a08b1c8708136d3636236a1c6256fbcea (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/qv4compileddata_p.h')
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index a9a0ebbf51..f796061cb7 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -115,10 +115,10 @@ struct TableIterator struct Location { - qint32 line : 20; - qint32 column : 12; + quint32 line : 20; + quint32 column : 12; - Location(): line(-1), column(-1) {} + Location(): line(0), column(0) {} inline bool operator<(const Location &other) const { return line < other.line || |