File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -97,10 +97,8 @@ class Lexer {
9797 }
9898 case ' =' :
9999 Buf = Buf.drop_front ();
100- if (Buf.starts_with (" =" )) {
101- Buf = Buf.drop_front ();
100+ if (Buf.consume_front (" =" ))
102101 return Token (EqualEqual, " ==" );
103- }
104102 return Token (Equal, " =" );
105103 case ' ,' :
106104 Buf = Buf.drop_front ();
Original file line number Diff line number Diff line change @@ -1816,8 +1816,7 @@ std::string DotCfgDiffNode::getBodyContent() const {
18161816 for (unsigned I = 0 ; I < 2 ; ++I) {
18171817 SR[I] = Data[I]->getBody ();
18181818 // drop initial '\n' if present
1819- if (SR[I][0 ] == ' \n ' )
1820- SR[I] = SR[I].drop_front ();
1819+ SR[I].consume_front (" \n " );
18211820 // drop predecessors as they can be big and are redundant
18221821 SR[I] = SR[I].drop_until ([](char C) { return C == ' \n ' ; }).drop_front ();
18231822 }
Original file line number Diff line number Diff line change @@ -77,8 +77,8 @@ formatv_object_base::parseReplacementItem(StringRef Spec) {
7777 assert (false && " Invalid replacement field layout specification!" );
7878 }
7979 RepString = RepString.trim ();
80- if (! RepString.empty () && RepString. front () == ' : ' ) {
81- Options = RepString.drop_front (). trim ();
80+ if (RepString.consume_front ( " : " ) ) {
81+ Options = RepString.trim ();
8282 RepString = StringRef ();
8383 }
8484 RepString = RepString.trim ();
You can’t perform that action at this time.
0 commit comments