From 7ab6783e24c6a05a67f319817cd1bdd026a7ce43 Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 24 Jul 2019 18:40:10 +0200 Subject: 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 --- src/plugins/cpptools/cppsourceprocessor.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/plugins/cpptools/cppsourceprocessor.cpp') diff --git a/src/plugins/cpptools/cppsourceprocessor.cpp b/src/plugins/cpptools/cppsourceprocessor.cpp index 35a0ccf529..7f232c1ad7 100644 --- a/src/plugins/cpptools/cppsourceprocessor.cpp +++ b/src/plugins/cpptools/cppsourceprocessor.cpp @@ -324,8 +324,8 @@ void CppSourceProcessor::macroAdded(const CPlusPlus::Macro ¯o) m_currentDoc->appendMacro(macro); } -void CppSourceProcessor::passedMacroDefinitionCheck(unsigned bytesOffset, unsigned utf16charsOffset, - unsigned line, const CPlusPlus::Macro ¯o) +void CppSourceProcessor::passedMacroDefinitionCheck(int bytesOffset, int utf16charsOffset, + int line, const CPlusPlus::Macro ¯o) { if (!m_currentDoc) return; @@ -336,7 +336,7 @@ void CppSourceProcessor::passedMacroDefinitionCheck(unsigned bytesOffset, unsign line, QVector()); } -void CppSourceProcessor::failedMacroDefinitionCheck(unsigned bytesOffset, unsigned utf16charOffset, +void CppSourceProcessor::failedMacroDefinitionCheck(int bytesOffset, int utf16charOffset, const ByteArrayRef &name) { if (!m_currentDoc) @@ -346,8 +346,8 @@ void CppSourceProcessor::failedMacroDefinitionCheck(unsigned bytesOffset, unsign bytesOffset, utf16charOffset); } -void CppSourceProcessor::notifyMacroReference(unsigned bytesOffset, unsigned utf16charOffset, - unsigned line, const CPlusPlus::Macro ¯o) +void CppSourceProcessor::notifyMacroReference(int bytesOffset, int utf16charOffset, + int line, const CPlusPlus::Macro ¯o) { if (!m_currentDoc) return; @@ -358,8 +358,8 @@ void CppSourceProcessor::notifyMacroReference(unsigned bytesOffset, unsigned utf line, QVector()); } -void CppSourceProcessor::startExpandingMacro(unsigned bytesOffset, unsigned utf16charOffset, - unsigned line, const CPlusPlus::Macro ¯o, +void CppSourceProcessor::startExpandingMacro(int bytesOffset, int utf16charOffset, + int line, const CPlusPlus::Macro ¯o, const QVector &actuals) { if (!m_currentDoc) @@ -371,7 +371,7 @@ void CppSourceProcessor::startExpandingMacro(unsigned bytesOffset, unsigned utf1 line, actuals); } -void CppSourceProcessor::stopExpandingMacro(unsigned, const CPlusPlus::Macro &) +void CppSourceProcessor::stopExpandingMacro(int, const CPlusPlus::Macro &) { if (!m_currentDoc) return; @@ -409,19 +409,19 @@ void CppSourceProcessor::mergeEnvironment(Document::Ptr doc) m_env.addMacros(doc->definedMacros()); } -void CppSourceProcessor::startSkippingBlocks(unsigned utf16charsOffset) +void CppSourceProcessor::startSkippingBlocks(int utf16charsOffset) { if (m_currentDoc) m_currentDoc->startSkippingBlocks(utf16charsOffset); } -void CppSourceProcessor::stopSkippingBlocks(unsigned utf16charsOffset) +void CppSourceProcessor::stopSkippingBlocks(int utf16charsOffset) { if (m_currentDoc) m_currentDoc->stopSkippingBlocks(utf16charsOffset); } -void CppSourceProcessor::sourceNeeded(unsigned line, const QString &fileName, IncludeType type, +void CppSourceProcessor::sourceNeeded(int line, const QString &fileName, IncludeType type, const QStringList &initialIncludes) { if (fileName.isEmpty()) -- cgit v1.2.1