MCPcopy Create free account
hub / github.com/DFHack/dfhack / getVersionInfosForCurOs

Method getVersionInfosForCurOs

library/VersionInfoFactory.cpp:85–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85std::vector<std::shared_ptr<const VersionInfo>> VersionInfoFactory::getVersionInfosForCurOs() const {
86 static const OSType expected = VersionInfo::getCurOS();
87 static const string zeroMd5 = "00000000000000000000000000000000";
88
89 std::vector<std::shared_ptr<const VersionInfo>> ret;
90
91 for (const auto& version : versions) {
92 if (version->getOS() == expected
93 && version->getVersion().find("LOCAL") == string::npos
94 && !version->hasPE(0)
95 && !version->hasMD5(zeroMd5))
96 {
97 ret.emplace_back(version);
98 }
99 }
100
101 return ret;
102}
103
104static uintptr_t to_addr(const char * cstr) {
105 if (sizeof(uintptr_t) == sizeof(unsigned long))

Callers 1

InitMainThreadMethod · 0.80

Calls 2

getCurOSFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected