Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- gap_buffer::gap_buffer() :
- buffer(malloc(char_type[alloc_size] * sizeof(char_type), std::free)
- buffer_size(alloc_size),
- lptr(lptr_beg()), rptr(rptr_beg()),
- staging_lptr(lptr), staging_rptr(rptr),
- character_num(0),
- codepoint_num(0) {
- }
- gap_buffer::gap_buffer(const gap_buffer& other) :
- buffer(malloc(char_type[other.buffer_size] * sizeof(char_type)), std::free),
- lptr(other.lptr), rptr(other.rptr),
- staging_lptr(other.staging_lptr), staging_rptr(other.staging_rptr),
- buffer_size(other.buffer_size),
- character_num(other.character_num),
- codepoint_num(other.codepoint_num),
- lines(other.lines) {
- std::memcpy(lptr_beg(), other.lptr_beg(), lsize());
- std::memcpy(rptr, other.rptr, rsize());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement