Changeset View
Changeset View
Standalone View
Standalone View
kdev-pg/ASBeautifier.cpp
Show First 20 Lines • Show All 979 Lines • ▼ Show 20 Line(s) | 976 | { | |||
---|---|---|---|---|---|
980 | continue; | 980 | continue; | ||
981 | } | 981 | } | ||
982 | else if (!(isInComment || isInLineComment) && line.compare(i, 2, "/*") == 0) | 982 | else if (!(isInComment || isInLineComment) && line.compare(i, 2, "/*") == 0) | ||
983 | { | 983 | { | ||
984 | isInComment = true; | 984 | isInComment = true; | ||
985 | outBuffer.append(1, '*'); | 985 | outBuffer.append(1, '*'); | ||
986 | ++i; | 986 | ++i; | ||
987 | size_t j = line.find_first_not_of(" \t"); | 987 | size_t j = line.find_first_not_of(" \t"); | ||
988 | if (!line.compare(j, 2, "/*") == 0) // does line start with comment? | 988 | if (line.compare(j, 2, "/*") != 0) // does line start with comment? | ||
989 | blockCommentNoIndent = true; // if no, cannot indent continuation lines | 989 | blockCommentNoIndent = true; // if no, cannot indent continuation lines | ||
990 | continue; | 990 | continue; | ||
991 | } | 991 | } | ||
992 | else if ((isInComment || isInLineComment) && line.compare(i, 2, "*/") == 0) | 992 | else if ((isInComment || isInLineComment) && line.compare(i, 2, "*/") == 0) | ||
993 | { | 993 | { | ||
994 | isInComment = false; | 994 | isInComment = false; | ||
995 | outBuffer.append(1, '/'); | 995 | outBuffer.append(1, '/'); | ||
996 | ++i; | 996 | ++i; | ||
▲ Show 20 Lines • Show All 940 Lines • Show Last 20 Lines |