From ba61d51124873c57a170e87cbf5922583fb7b6f0 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 5 Dec 2018 20:22:35 +0000 Subject: [PATCH] Visual C++ 64-bit warning fixes in doxygen sources --- Source/Doxygen/javadoc.cxx | 10 +++++----- Source/Doxygen/pydoc.cxx | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Doxygen/javadoc.cxx b/Source/Doxygen/javadoc.cxx index 628f5a666..72f84ab6c 100644 --- a/Source/Doxygen/javadoc.cxx +++ b/Source/Doxygen/javadoc.cxx @@ -243,10 +243,10 @@ JavaDocConverter::JavaDocConverter(int flags) : std::string JavaDocConverter::formatCommand(std::string unformattedLine, int indent) { std::string formattedLines; return unformattedLine; // currently disabled - int lastPosition = 0; - int i = 0; + std::string::size_type lastPosition = 0; + std::string::size_type i = 0; int isFirstLine = 1; - while (i != -1 && i < (int) unformattedLine.length()) { + while (i != std::string::npos && i < unformattedLine.length()) { lastPosition = i; if (isFirstLine) { i += APPROX_LINE_LENGTH; @@ -256,7 +256,7 @@ std::string JavaDocConverter::formatCommand(std::string unformattedLine, int ind i = unformattedLine.find(" ", i); - if (i > 0 && i + 1 < (int) unformattedLine.length()) { + if (i > 0 && i + 1 < unformattedLine.length()) { if (!isFirstLine) for (int j = 0; j < indent; j++) { formattedLines.append("\t"); @@ -268,7 +268,7 @@ std::string JavaDocConverter::formatCommand(std::string unformattedLine, int ind } } - if (lastPosition < (int) unformattedLine.length()) { + if (lastPosition < unformattedLine.length()) { if (!isFirstLine) { for (int j = 0; j < indent; j++) { formattedLines.append("\t"); diff --git a/Source/Doxygen/pydoc.cxx b/Source/Doxygen/pydoc.cxx index 0f8484d6b..8c3090035 100644 --- a/Source/Doxygen/pydoc.cxx +++ b/Source/Doxygen/pydoc.cxx @@ -52,7 +52,7 @@ public: m_output = &output; m_indent = &indent; - const size_t lastNonSpace = m_output->find_last_not_of(' '); + const string::size_type lastNonSpace = m_output->find_last_not_of(' '); if (lastNonSpace == string::npos) { m_firstLineIndent = m_output->length(); } else if ((*m_output)[lastNonSpace] == '\n') { @@ -95,7 +95,7 @@ public: private: string *m_output; string *m_indent; - unsigned m_firstLineIndent; + string::size_type m_firstLineIndent; bool m_initialized; IndentGuard(const IndentGuard &); @@ -131,7 +131,7 @@ static size_t determineIndent(const string &s) { } static void trimWhitespace(string &s) { - const size_t lastNonSpace = s.find_last_not_of(' '); + const string::size_type lastNonSpace = s.find_last_not_of(' '); if (lastNonSpace == string::npos) s.clear(); else