mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Add INVALID_PROCESS
to represent invalid PROCESS
value
This commit is contained in:
parent
4834cfdac9
commit
a0c61a1b60
|
@ -2449,8 +2449,10 @@ void cmdline_free(int argc, const char **argv);
|
|||
|
||||
#if defined(CONF_FAMILY_WINDOWS)
|
||||
typedef void *PROCESS;
|
||||
constexpr PROCESS INVALID_PROCESS = nullptr;
|
||||
#else
|
||||
typedef pid_t PROCESS;
|
||||
constexpr PROCESS INVALID_PROCESS = 0;
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
|
@ -84,7 +84,7 @@ CMenus::CMenus()
|
|||
m_DemoPlayerState = DEMOPLAYER_NONE;
|
||||
m_Dummy = false;
|
||||
|
||||
m_ServerProcess.m_Process = 0;
|
||||
m_ServerProcess.m_Process = INVALID_PROCESS;
|
||||
|
||||
for(SUIAnimator &animator : m_aAnimatorsSettingsTab)
|
||||
{
|
||||
|
|
|
@ -294,6 +294,6 @@ void CMenus::KillServer()
|
|||
if(m_ServerProcess.m_Process)
|
||||
{
|
||||
kill_process(m_ServerProcess.m_Process);
|
||||
m_ServerProcess.m_Process = 0;
|
||||
m_ServerProcess.m_Process = INVALID_PROCESS;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue