|
Than Ngo |
135737 |
commit e54ccc0e6eb12a0720860d863a89cb3f1a83f2a2
|
|
Than Ngo |
135737 |
Author: Dimitri van Heesch <doxygen@gmail.com>
|
|
Than Ngo |
135737 |
Date: Sun Feb 3 14:33:35 2019 +0100
|
|
Than Ngo |
135737 |
|
|
Than Ngo |
135737 |
Issue 6814: Inconsistent whitespace removal for operators in 1.8.15
|
|
Than Ngo |
135737 |
|
|
Than Ngo |
135737 |
diff --git a/src/util.cpp b/src/util.cpp
|
|
Than Ngo |
135737 |
index 9a0e513b..3a3bfd38 100644
|
|
Than Ngo |
135737 |
--- a/src/util.cpp
|
|
Than Ngo |
135737 |
+++ b/src/util.cpp
|
|
Than Ngo |
135737 |
@@ -1895,7 +1895,7 @@ QCString removeRedundantWhiteSpace(const QCString &s)
|
|
Than Ngo |
135737 |
if (g_charAroundSpace.charMap[(uchar)pc].before &&
|
|
Than Ngo |
135737 |
g_charAroundSpace.charMap[(uchar)nc].after &&
|
|
Than Ngo |
135737 |
!(pc==',' && nc=='.') &&
|
|
Than Ngo |
135737 |
- (osp<8 || (osp>=8 && pc!='"' && isId(nc)) || (osp>=8 && pc!='"' && nc!='"'))
|
|
Than Ngo |
135737 |
+ (osp<8 || (osp>=8 && isId(pc) && isId(nc)))
|
|
Than Ngo |
135737 |
// e.g. 'operator >>' -> 'operator>>',
|
|
Than Ngo |
135737 |
// 'operator "" _x' -> 'operator""_x',
|
|
Than Ngo |
135737 |
// but not 'operator int' -> 'operatorint'
|
|
Than Ngo |
135737 |
commit 2802e2b4ee8158dba3f3584037e99907c6db7ec4
|
|
Than Ngo |
135737 |
Author: Dimitri van Heesch <doxygen@gmail.com>
|
|
Than Ngo |
135737 |
Date: Mon Feb 4 22:19:56 2019 +0100
|
|
Than Ngo |
135737 |
|
|
Than Ngo |
135737 |
Issue 6814: Further finetuning for inconsistent whitespace removal for operators in 1.8.15
|
|
Than Ngo |
135737 |
|
|
Than Ngo |
135737 |
diff --git a/src/util.cpp b/src/util.cpp
|
|
Than Ngo |
135737 |
index 3a3bfd38..53b176d4 100644
|
|
Than Ngo |
135737 |
--- a/src/util.cpp
|
|
Than Ngo |
135737 |
+++ b/src/util.cpp
|
|
Than Ngo |
135737 |
@@ -1847,7 +1847,8 @@ QCString removeRedundantWhiteSpace(const QCString &s)
|
|
Than Ngo |
135737 |
case '*':
|
|
Than Ngo |
135737 |
if (i>0 && pc!=' ' && pc!='\t' && pc!=':' &&
|
|
Than Ngo |
135737 |
pc!='*' && pc!='&' && pc!='(' && pc!='/' &&
|
|
Than Ngo |
135737 |
- pc!='.' && (osp<9 || !(pc=='>' && osp==11)))
|
|
Than Ngo |
135737 |
+ pc!='.' && osp<9
|
|
Than Ngo |
135737 |
+ )
|
|
Than Ngo |
135737 |
// avoid splitting &&, **, .*, operator*, operator->*
|
|
Than Ngo |
135737 |
{
|
|
Than Ngo |
135737 |
*dst++=' ';
|
|
Than Ngo |
135737 |
@@ -1855,7 +1856,7 @@ QCString removeRedundantWhiteSpace(const QCString &s)
|
|
Than Ngo |
135737 |
*dst++=c;
|
|
Than Ngo |
135737 |
break;
|
|
Than Ngo |
135737 |
case '&':
|
|
Than Ngo |
135737 |
- if (i>0 && isId(pc))
|
|
Than Ngo |
135737 |
+ if (i>0 && isId(pc) && osp<9)
|
|
Than Ngo |
135737 |
{
|
|
Than Ngo |
135737 |
if (nc != '=')
|
|
Than Ngo |
135737 |
// avoid splitting operator&=
|