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

Method GetInt

src/engine/shared/packer.cpp:103–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101}
102
103int CUnpacker::GetInt()
104{
105 if(m_Error)
106 return 0;
107
108 if(m_pCurrent >= m_pEnd)
109 {
110 m_Error = true;
111 return 0;
112 }
113
114 int i;
115 const unsigned char *pNext = CVariableInt::Unpack(m_pCurrent, &i, m_pEnd - m_pCurrent);
116 if(!pNext)
117 {
118 m_Error = true;
119 return 0;
120 }
121 m_pCurrent = pNext;
122 return i;
123}
124
125int CUnpacker::GetIntOrDefault(int Default)
126{

Callers 15

OnMessageMethod · 0.45
TranslateGameMsgMethod · 0.45
DemoFilterChatMethod · 0.45
RecordPlayerMessageMethod · 0.45
GetSqlTop5TeamMethod · 0.45
MapInfoMethod · 0.45
SaveScoreMethod · 0.45
ShowRankMethod · 0.45
ShowTeamRankMethod · 0.45
ShowTopMethod · 0.45
ShowPlayerTeamTop5Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected