CMAKE_CXX_STANDARD
and similar, add the
parameter directly.f0c647d
Change os_compare_version
to os_is_winxp_or_... - heinrich5991
[
a60320b](https://github.com/ddnet/ddnet/commit/a60320b87a6d4319473df9e78b2126ec9d27be3a) Activate C++11 in old CMake as well - heinrich5991
[
bf4e5c2`](https://github.com/ddnet/ddnet/commit/bf4e5c2389c04de0d7ab9963423338cabd02d291) [ci skip] -bors-staging-tmp-951 - bors[bot]f0c647d
Change os_compare_version
to os_is_winxp_or_... - heinrich5991
[
a60320b](https://github.com/ddnet/ddnet/commit/a60320b87a6d4319473df9e78b2126ec9d27be3a) Activate C++11 in old CMake as well - heinrich5991
[
add0b88`](https://github.com/ddnet/ddnet/commit/add0b8897635d3f311a004e13447e8f684e6c429) Merge #951 - bors[bot]f0c647d
Change os_compare_version
to os_is_winxp_or_... - heinrich5991
[
a60320b](https://github.com/ddnet/ddnet/commit/a60320b87a6d4319473df9e78b2126ec9d27be3a) Activate C++11 in old CMake as well - heinrich5991
[
add0b88`](https://github.com/ddnet/ddnet/commit/add0b8897635d3f311a004e13447e8f684e6c429) Merge #951 - bors[bot]std::shared_ptr<IJob>
, this will ensure the
appropriate lifetime of the given parameters, it also allows for proper
destruction. Remove the now obsolete IFetcher
interface and CFetcher
class.
Also adds some locks to CUpdater
, previously it didn't have any locks
at all.shared_ptr
sm_Result
I meanvirtual
means it can be implemented= 0
means it has to be implementedIJob
subclass if you want= 0
m_Progress/m_Current/m_Size
to be atomic, while it's well defined when accessing from OnProgress I'm not sure if it's entirely safe if you access it while the callback is accessing it (edited)m_aStatus
and/or m_Percent
don't really need it to be well defined eitherdiff --git a/src/engine/shared/masterserver.cpp b/src/engine/shared/masterserver.cpp
index 85d1f3f15..bf8596a6e 100644
--- a/src/engine/shared/masterserver.cpp
+++ b/src/engine/shared/masterserver.cpp
@@ -53,6 +53,7 @@ public:
// add lookup jobs
for(int i = 0; i < MAX_MASTERSERVERS; i++)
{
+ dbg_msg("dbg2", "%p", m_aMasterServers[i].m_pLookup);
*m_aMasterServers[i].m_pLookup = CHostLookup(m_aMasterServers[i].m_aHostname, Nettype);
m_pEngine->AddJob(m_aMasterServers[i].m_pLookup);
m_aMasterServers[i].m_Valid = false;
@@ -136,7 +137,11 @@ public:
{
mem_zero(m_aMasterServers, sizeof(m_aMasterServers));
for(int i = 0; i < MAX_MASTERSERVERS; i++)
+ {
+ m_aMasterServers[i].m_pLookup = std::make_shared<CHostLookup>();
+ dbg_msg("dbg", "%p", m_aMasterServers[i].m_pLookup);
str_format(m_aMasterServers[i].m_aHostname, sizeof(m_aMasterServers[i].m_aHostname), "master%d.teeworlds.com", i+1);
+ }
}
virtual int Load()
shared_ptr
*m_aMasterServers[i].m_pLookup
yarn run watch
npm run watch