MCPcopy Create free account
hub / github.com/MyGUI/mygui / push

Method push

Tools/EditorFramework/pugixml.cpp:1779–1793  ·  view source on GitHub ↗

Push new gap, move s count bytes further (skipping the gap). Collapse previous gap.

Source from the content-addressed store, hash-verified

1777 // Push new gap, move s count bytes further (skipping the gap).
1778 // Collapse previous gap.
1779 void push(char_t*& s, size_t count)
1780 {
1781 if (end) // there was a gap already; collapse it
1782 {
1783 // Move [old_gap_end, new_gap_start) to [old_gap_start, ...)
1784 assert(s >= end);
1785 memmove(end - size, end, reinterpret_cast<char*>(s) - reinterpret_cast<char*>(end));
1786 }
1787
1788 s += count; // end of current gap
1789
1790 // "merge" two gaps
1791 end = s;
1792 size += count;
1793 }
1794
1795 // Collapse all gaps, return past-the-end pointer
1796 char_t* flush(char_t* s)

Callers 7

strconv_escapeFunction · 0.45
strconv_commentFunction · 0.45
strconv_cdataFunction · 0.45
parseMethod · 0.45
parse_wnormMethod · 0.45
parse_wconvMethod · 0.45
parse_eolMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected