本文整理汇总了C++中BYTE_VECTOR::pop_back方法的典型用法代码示例。如果您正苦于以下问题:C++ BYTE_VECTOR::pop_back方法的具体用法?C++ BYTE_VECTOR::pop_back怎么用?C++ BYTE_VECTOR::pop_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BYTE_VECTOR
的用法示例。
在下文中一共展示了BYTE_VECTOR::pop_back方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ParseBlameOutput
//.........这里部分代码省略.........
{
size_t numberOfSubsequentLinesBegin = finalLineNumberEnd + 1;
size_t numberOfSubsequentLinesEnd = lineEnd;
numberOfSubsequentLines = atoi(CStringA(reinterpret_cast<LPCSTR>(&data[numberOfSubsequentLinesBegin]), static_cast<int>(numberOfSubsequentLinesEnd - numberOfSubsequentLinesBegin)));
}
}
else
{
// parse error
numberOfSubsequentLines = 0;
}
}
else
{
// parse error
numberOfSubsequentLines = 0;
}
auto it = hashToFilename.find(hash);
if (it != hashToFilename.end())
filename = it->second;
else
filename.Empty();
}
else
{
// parse error
numberOfSubsequentLines = 0;
}
}
else
{
size_t tokenBegin = lineBegin;
size_t tokenEnd = data.find(' ', tokenBegin);
if (tokenEnd != BYTE_VECTOR::npos)
{
if (!strncmp("filename", reinterpret_cast<const char*>(&data[tokenBegin]), tokenEnd - tokenBegin))
{
size_t filenameBegin = tokenEnd + 1;
size_t filenameEnd = lineEnd;
CStringA filenameA = CStringA(reinterpret_cast<LPCSTR>(&data[filenameBegin]), static_cast<int>(filenameEnd - filenameBegin));
filename = UnquoteFilename(filenameA);
auto r = hashToFilename.emplace(hash, filename);
if (!r.second)
{
r.first->second = filename;
}
}
}
}
}
else
{
expectHash = true;
// remove <TAB> at start
BYTE_VECTOR line;
if (lineEnd - 1 > lineBegin)
line.append(&data[lineBegin + 1], lineEnd-lineBegin - 1);
while (!line.empty() && line[line.size() - 1] == 13)
line.pop_back();
hashes.push_back(hash);
filenames.push_back(filename);
originalLineNumbers.push_back(originalLineNumber);
rawLines.push_back(line);
--numberOfSubsequentLines;
}
}
pos = lineEnd + 1;
}
for (const auto& hash2 : hashes)
{
CString err;
GitRev* pRev = GetRevForHash(HashToRev, hash2, &err);
if (pRev)
{
authors.push_back(pRev->GetAuthorName());
dates.push_back(CLoglistUtils::FormatDateAndTime(pRev->GetAuthorDate(), dateFormat, true, bRelativeTimes));
}
else
{
MessageBox(nullptr, err, L"TortoiseGit", MB_ICONERROR);
authors.emplace_back();
dates.emplace_back();
}
}
m_Hash.swap(hashes);
m_OriginalLineNumbers.swap(originalLineNumbers);
m_Filenames.swap(filenames);
m_RawLines.swap(rawLines);
m_Authors.swap(authors);
m_Dates.swap(dates);
// reset detected and applied encoding
m_encode = -1;
m_Utf8Lines.clear();
}