MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / Add

Method Add

src/Misc/SyncLogging.h:35–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33 SyncLogEventBuffer() : Data(size), LastWritePosition(0), LastReadPosition(-1), HasBeenFilled(false) { };
34
35 bool Add(T item)
36 {
37 Data[LastWritePosition] = item;
38 LastWritePosition++;
39
40 if (static_cast<size_t>(LastWritePosition) >= Data.size())
41 {
42 HasBeenFilled = true;
43 LastWritePosition = 0;
44 return true;
45 }
46
47 return false;
48 }
49
50 T Get()
51 {

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected