MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / TrimPatchLine

Method TrimPatchLine

pcsx2/Patch.cpp:153–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151} // namespace Patch
152
153void Patch::TrimPatchLine(std::string& buffer)
154{
155 StringUtil::StripWhitespace(&buffer);
156 if (std::strncmp(buffer.c_str(), "//", 2) == 0)
157 {
158 // comment
159 buffer.clear();
160 }
161
162 // check for comments at the end of a line
163 const std::string::size_type pos = buffer.find("//");
164 if (pos != std::string::npos)
165 buffer.erase(pos);
166}
167
168bool Patch::ContainsPatchName(const std::vector<PatchGroup>& patch_list, const std::string_view patch_name)
169{

Callers

nothing calls this directly

Calls 5

StripWhitespaceFunction · 0.85
c_strMethod · 0.45
clearMethod · 0.45
findMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected