Problem: Wrong indenting for C++ constructor.
Solution: Recognize ::. (Anhong)
{
if (cin_iscomment(s)) /* ignore comments */
s = cin_skipcomment(s);
+ else if (*s == ':')
+ {
+ if (*(s + 1) == ':')
+ s += 2;
+ else
+ /* To avoid a mistake in the following situation:
+ * A::A(int a, int b)
+ * : a(0) // <--not a function decl
+ * , b(0)
+ * {...
+ */
+ return FALSE;
+ }
else
++s;
}
{
}
+A::A(int a, int b)
+: aa(a),
+bb(b),
+cc(c)
+{
+}
+
class CAbc :
public BaseClass1,
protected BaseClass2
{
}
+A::A(int a, int b)
+ : aa(a),
+ bb(b),
+ cc(c)
+{
+}
+
class CAbc :
public BaseClass1,
protected BaseClass2
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 912,
/**/
911,
/**/