diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2024-09-09 12:47:53 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-09-11 10:51:30 +0200 |
| commit | 963f935e04b83c5a03cde607559e33ca0ef060cd (patch) | |
| tree | cd40e18311dee201ccf54a2b9a41c9b511bf90c8 | |
| parent | bb280767637f4f892d9f64cd497962b96b1e507b (diff) | |
qmlls: Fix some style problems
Initialize members and do not use char as underlying type for enums
(since we don't know whether it's signed).
Coverity-Id: 468882
Change-Id: I89e78d965dad0dbee543da6c4d8a406b7cc0f50c
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
| -rw-r--r-- | src/qmlls/qqmllsutils_p.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qmlls/qqmllsutils_p.h b/src/qmlls/qqmllsutils_p.h index 36e6448181..0105df2c98 100644 --- a/src/qmlls/qqmllsutils_p.h +++ b/src/qmlls/qqmllsutils_p.h @@ -37,11 +37,11 @@ struct ItemLocation struct TextPosition { - int line; - int character; + int line = 0; + int character = 0; }; -enum IdentifierType : char { +enum IdentifierType : quint8 { JavaScriptIdentifier, PropertyIdentifier, PropertyChangedSignalIdentifier, @@ -62,7 +62,7 @@ enum IdentifierType : char { struct ErrorMessage { - int code; + int code = 0; QString message; }; @@ -70,7 +70,7 @@ struct ExpressionType { std::optional<QString> name; QQmlJSScope::ConstPtr semanticScope; - IdentifierType type; + IdentifierType type = JavaScriptIdentifier; }; class Location |
