removeStaleSimpleKeyCandidates();
SimpleKey SK;
- SK.Tok = TokenQueue.front();
+ SK.Tok = TokenQueue.begin();
if (std::find(SimpleKeys.begin(), SimpleKeys.end(), SK)
== SimpleKeys.end())
break;
TokenQueue.push_back(T);
// [ and { may begin a simple key.
- saveSimpleKeyCandidate(TokenQueue.back(), Column - 1, false);
+ saveSimpleKeyCandidate(--TokenQueue.end(), Column - 1, false);
// And may also be followed by a simple key.
IsSimpleKeyAllowed = true;
T.Range = StringRef(Start, Current - Start);
TokenQueue.push_back(T);
- saveSimpleKeyCandidate(TokenQueue.back(), ColStart, false);
+ saveSimpleKeyCandidate(--TokenQueue.end(), ColStart, false);
IsSimpleKeyAllowed = false;
TokenQueue.push_back(T);
// Plain scalars can be simple keys.
- saveSimpleKeyCandidate(TokenQueue.back(), ColStart, false);
+ saveSimpleKeyCandidate(--TokenQueue.end(), ColStart, false);
IsSimpleKeyAllowed = false;
TokenQueue.push_back(T);
// Alias and anchors can be simple keys.
- saveSimpleKeyCandidate(TokenQueue.back(), ColStart, false);
+ saveSimpleKeyCandidate(--TokenQueue.end(), ColStart, false);
IsSimpleKeyAllowed = false;
TokenQueue.push_back(T);
// Tags can be simple keys.
- saveSimpleKeyCandidate(TokenQueue.back(), ColStart, false);
+ saveSimpleKeyCandidate(--TokenQueue.end(), ColStart, false);
IsSimpleKeyAllowed = false;