summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/FastPreprocessor.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-07-24 18:40:10 +0200
committerhjk <hjk@qt.io>2019-07-26 09:23:48 +0000
commit7ab6783e24c6a05a67f319817cd1bdd026a7ce43 (patch)
tree8b56ea311d333f45f300b915c3bd25a2b77b4aef /src/libs/cplusplus/FastPreprocessor.cpp
parenteab0df22f98fab37585e4513de836a06e4aa05d5 (diff)
downloadqt-creator-7ab6783e24c6a05a67f319817cd1bdd026a7ce43.tar.gz
Standardize on int for line and column values
Recently tons of warnings show up for presumably "problematic" singned <-> unsigned and size conversions. The Qt side uses 'int', and that's the biggest 'integration surface' for us, so instead of establishing some internal boundary between signed and unsigned areas, push that boundary out of creator core code, and use 'int' everywhere. Because it reduces friction further, also do it in libcplusplus. Change-Id: I84f3b79852c8029713e7ea6f133ffb9ef7030a70 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Diffstat (limited to 'src/libs/cplusplus/FastPreprocessor.cpp')
-rw-r--r--src/libs/cplusplus/FastPreprocessor.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libs/cplusplus/FastPreprocessor.cpp b/src/libs/cplusplus/FastPreprocessor.cpp
index 78a25826cc..be63dea9a2 100644
--- a/src/libs/cplusplus/FastPreprocessor.cpp
+++ b/src/libs/cplusplus/FastPreprocessor.cpp
@@ -70,7 +70,7 @@ QByteArray FastPreprocessor::run(Document::Ptr newDoc,
return preprocessed;
}
-void FastPreprocessor::sourceNeeded(unsigned line, const QString &fileName, IncludeType mode,
+void FastPreprocessor::sourceNeeded(int line, const QString &fileName, IncludeType mode,
const QStringList &initialIncludes)
{
Q_UNUSED(initialIncludes)
@@ -115,8 +115,8 @@ static const Macro revision(const Snapshot &s, const Macro &m)
return m;
}
-void FastPreprocessor::passedMacroDefinitionCheck(unsigned bytesOffset, unsigned utf16charsOffset,
- unsigned line, const Macro &macro)
+void FastPreprocessor::passedMacroDefinitionCheck(int bytesOffset, int utf16charsOffset,
+ int line, const Macro &macro)
{
Q_ASSERT(_currentDoc);
@@ -126,7 +126,7 @@ void FastPreprocessor::passedMacroDefinitionCheck(unsigned bytesOffset, unsigned
line, QVector<MacroArgumentReference>());
}
-void FastPreprocessor::failedMacroDefinitionCheck(unsigned bytesOffset, unsigned utf16charsOffset,
+void FastPreprocessor::failedMacroDefinitionCheck(int bytesOffset, int utf16charsOffset,
const ByteArrayRef &name)
{
Q_ASSERT(_currentDoc);
@@ -135,8 +135,8 @@ void FastPreprocessor::failedMacroDefinitionCheck(unsigned bytesOffset, unsigned
bytesOffset, utf16charsOffset);
}
-void FastPreprocessor::notifyMacroReference(unsigned bytesOffset, unsigned utf16charsOffset,
- unsigned line, const Macro &macro)
+void FastPreprocessor::notifyMacroReference(int bytesOffset, int utf16charsOffset,
+ int line, const Macro &macro)
{
Q_ASSERT(_currentDoc);
@@ -146,8 +146,8 @@ void FastPreprocessor::notifyMacroReference(unsigned bytesOffset, unsigned utf16
line, QVector<MacroArgumentReference>());
}
-void FastPreprocessor::startExpandingMacro(unsigned bytesOffset, unsigned utf16charsOffset,
- unsigned line, const Macro &macro,
+void FastPreprocessor::startExpandingMacro(int bytesOffset, int utf16charsOffset,
+ int line, const Macro &macro,
const QVector<MacroArgumentReference> &actuals)
{
Q_ASSERT(_currentDoc);