MCPcopy Create free account
hub / github.com/ddnet/ddnet / Valid

Method Valid

src/engine/shared/demo.cpp:33–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31static constexpr LOG_COLOR DEMO_PRINT_COLOR = {191, 178, 178};
32
33bool CDemoHeader::Valid() const
34{
35 // Check marker and ensure that strings are zero-terminated and valid UTF-8.
36 return mem_comp(m_aMarker, gs_aHeaderMarker, sizeof(gs_aHeaderMarker)) == 0 &&
37 mem_has_null(m_aNetversion, sizeof(m_aNetversion)) && str_utf8_check(m_aNetversion) &&
38 mem_has_null(m_aMapName, sizeof(m_aMapName)) && str_utf8_check(m_aMapName) &&
39 mem_has_null(m_aType, sizeof(m_aType)) && str_utf8_check(m_aType) &&
40 mem_has_null(m_aTimestamp, sizeof(m_aTimestamp)) && str_utf8_check(m_aTimestamp);
41}
42
43CDemoRecorder::CDemoRecorder(class CSnapshotDelta *pSnapshotDelta, bool NoMapData)
44{

Callers 7

CTextRenderClass · 0.45
TextExMethod · 0.45
CreateTextContainerMethod · 0.45
DeleteTextContainerMethod · 0.45
OnPreWindowResizeMethod · 0.45
GetDemoInfoMethod · 0.45

Calls 3

mem_compFunction · 0.85
mem_has_nullFunction · 0.85
str_utf8_checkFunction · 0.85

Tested by

no test coverage detected