File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -927,14 +927,12 @@ BreakableLineCommentSection::BreakableLineCommentSection(
927927 }
928928
929929 if (Lines[i].size () != IndentPrefix.size ()) {
930- PrefixSpaceChange [i] = FirstLineSpaceChange ;
930+ assert (Lines [i]. size () > IndentPrefix. size ()) ;
931931
932- if (SpacesInPrefix + PrefixSpaceChange[i] < Minimum) {
933- PrefixSpaceChange[i] +=
934- Minimum - (SpacesInPrefix + PrefixSpaceChange[i]);
935- }
932+ PrefixSpaceChange[i] = SpacesInPrefix + FirstLineSpaceChange < Minimum
933+ ? Minimum - SpacesInPrefix
934+ : FirstLineSpaceChange;
936935
937- assert (Lines[i].size () > IndentPrefix.size ());
938936 const auto FirstNonSpace = Lines[i][IndentPrefix.size ()];
939937 const bool IsFormatComment = LineTok && switchesFormatting (*LineTok);
940938 const bool LineRequiresLeadingSpace =
You can’t perform that action at this time.
0 commit comments