| 83 | } |
| 84 | |
| 85 | std::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 | |
| 104 | static uintptr_t to_addr(const char * cstr) { |
| 105 | if (sizeof(uintptr_t) == sizeof(unsigned long)) |
no test coverage detected