Visual C++ 64-bit warning fixes in doxygen sources

This commit is contained in:
William S Fulton 2018-12-05 20:22:35 +00:00
commit ba61d51124
2 changed files with 8 additions and 8 deletions

View file

@ -243,10 +243,10 @@ JavaDocConverter::JavaDocConverter(int flags) :
std::string JavaDocConverter::formatCommand(std::string unformattedLine, int indent) { std::string JavaDocConverter::formatCommand(std::string unformattedLine, int indent) {
std::string formattedLines; std::string formattedLines;
return unformattedLine; // currently disabled return unformattedLine; // currently disabled
int lastPosition = 0; std::string::size_type lastPosition = 0;
int i = 0; std::string::size_type i = 0;
int isFirstLine = 1; int isFirstLine = 1;
while (i != -1 && i < (int) unformattedLine.length()) { while (i != std::string::npos && i < unformattedLine.length()) {
lastPosition = i; lastPosition = i;
if (isFirstLine) { if (isFirstLine) {
i += APPROX_LINE_LENGTH; i += APPROX_LINE_LENGTH;
@ -256,7 +256,7 @@ std::string JavaDocConverter::formatCommand(std::string unformattedLine, int ind
i = unformattedLine.find(" ", i); i = unformattedLine.find(" ", i);
if (i > 0 && i + 1 < (int) unformattedLine.length()) { if (i > 0 && i + 1 < unformattedLine.length()) {
if (!isFirstLine) if (!isFirstLine)
for (int j = 0; j < indent; j++) { for (int j = 0; j < indent; j++) {
formattedLines.append("\t"); 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) { if (!isFirstLine) {
for (int j = 0; j < indent; j++) { for (int j = 0; j < indent; j++) {
formattedLines.append("\t"); formattedLines.append("\t");

View file

@ -52,7 +52,7 @@ public:
m_output = &output; m_output = &output;
m_indent = &indent; 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) { if (lastNonSpace == string::npos) {
m_firstLineIndent = m_output->length(); m_firstLineIndent = m_output->length();
} else if ((*m_output)[lastNonSpace] == '\n') { } else if ((*m_output)[lastNonSpace] == '\n') {
@ -95,7 +95,7 @@ public:
private: private:
string *m_output; string *m_output;
string *m_indent; string *m_indent;
unsigned m_firstLineIndent; string::size_type m_firstLineIndent;
bool m_initialized; bool m_initialized;
IndentGuard(const IndentGuard &); IndentGuard(const IndentGuard &);
@ -131,7 +131,7 @@ static size_t determineIndent(const string &s) {
} }
static void trimWhitespace(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) if (lastNonSpace == string::npos)
s.clear(); s.clear();
else else