MCPcopy Create free account
hub / github.com/WheretIB/nullc / AddSnapshotToList

Method AddSnapshotToList

GUI/RichTextarea.cpp:343–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341 firstShotR = lastShotR = NULL;
342 }
343 void AddSnapshotToList(bool redoList = false)
344 {
345 Snapshot *&firstShot = redoList ? firstShotR : firstShotU;
346 Snapshot *&lastShot = redoList ? lastShotR : lastShotU;
347 // Create linked list
348 if(!firstShot)
349 {
350 firstShot = lastShot = new Snapshot;
351 firstShot->prevShot = lastShot->nextShot = NULL;
352 }else{ // Or add element to it
353 lastShot->nextShot = new Snapshot;
354 lastShot->nextShot->prevShot = lastShot;
355 lastShot->nextShot->nextShot = NULL;
356 lastShot = lastShot->nextShot;
357 }
358 }
359 void TakeSnapshot(AreaLine *start, ChangeFlag changeFlag, unsigned int linesAffected, bool redo = false, bool clearRedo = true)
360 {
361 Snapshot *&lastShot = redo ? lastShotR : lastShotU;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected