summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2014-08-04 12:08:23 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2014-08-04 12:08:23 (GMT)
commitfe533aeb3d6618d30d2b1c99527812a8cf8cf1fe (patch)
tree08f59a36ec80786cb7d47d0fc7f5a6ee736a509d
parent6f0269ef3074bbc4bc16ad63a0e0a8f9b5f0ce31 (diff)
parent1be08948215fa665cc7e6779422ebf81a982de50 (diff)
downloadDoxygen-fe533aeb3d6618d30d2b1c99527812a8cf8cf1fe.zip
Doxygen-fe533aeb3d6618d30d2b1c99527812a8cf8cf1fe.tar.gz
Doxygen-fe533aeb3d6618d30d2b1c99527812a8cf8cf1fe.tar.bz2
Merge branch 'master' of github.com:doxygen/doxygen
-rw-r--r--src/util.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 39dfb5c..73a863a 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1667,10 +1667,11 @@ QCString removeRedundantWhiteSpace(const QCString &s)
uint l=s.length();
uint csp=0;
uint vsp=0;
+ char c;
for (i=0;i<l;i++)
{
nextChar:
- char c=s.at(i);
+ c=s.at(i);
// search for "const"
if (csp<6 && c==constScope[csp] && // character matches substring "const"
@@ -1705,7 +1706,7 @@ nextChar:
if (cc=='\\') // escaped character
{
growBuf.addChar(s.at(i+1));
- i+=2;
+ i+=2;
}
else if (cc=='"') // end of string
{ i++; goto nextChar; }
@@ -1737,14 +1738,16 @@ nextChar:
growBuf.addChar(',');
growBuf.addChar(' ');
}
- else if (i>0 &&
- ((isId(s.at(i)) && s.at(i-1)==')') ||
- (s.at(i)=='\'' && s.at(i-1)==' ')
+ else if (i>0 &&
+ (
+ (s.at(i-1)==')' && isId(c))
+ ||
+ (c=='\'' && s.at(i-1)==' ')
)
)
{
growBuf.addChar(' ');
- growBuf.addChar(s.at(i));
+ growBuf.addChar(c);
}
else if (c=='t' && csp==5 /*&& (i<5 || !isId(s.at(i-5)))*/ &&
!(isId(s.at(i+1)) /*|| s.at(i+1)==' '*/ ||