Skip to content

Commit

Permalink
[adminserver] Initialize class members in ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
dimhotepus committed Jan 3, 2025
1 parent 33ddf16 commit d033150
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tracker/AdminServer/GraphPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,10 @@ void CGraphPanel::CGraphsImage::Paint()
//-----------------------------------------------------------------------------
CGraphPanel::CGraphsImage::CGraphsImage(): vgui::Image(), points()
{
x = y = -1;
maxIn=maxOut=minIn=minOut=minFPS=maxFPS=minPing=maxPing=0;
maxPlayers = minPlayers = 0;
timeBetween = SECONDS;
net_i=net_o=fps=cpu=ping=players=false;
numAvgs=0;
memset(&avgPoint,0x0,sizeof(Points_t));
Expand Down
6 changes: 5 additions & 1 deletion tracker/AdminServer/TokenLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,14 @@ char* TokenLine::GetRestOfLine(int i)

TokenLine::TokenLine(char * string)
{
memset(m_token, 0, sizeof(m_token));
SetLine(string);
}

TokenLine::TokenLine()
{

memset(m_tokenBuffer, 0, sizeof(m_tokenBuffer));
memset(m_fullLine, 0, sizeof(m_fullLine));
memset(m_token, 0, sizeof(m_token));
m_tokenNumber = 0;
}

0 comments on commit d033150

Please sign in to comment.