Update user agent for macOS and fix compile warnings

This commit is contained in:
XMRig 2020-12-13 13:57:12 +07:00
parent a36fb7e728
commit 643142dc30
No known key found for this signature in database
GPG key ID: 446A53638BE94409
6 changed files with 29 additions and 12 deletions

View file

@ -85,6 +85,15 @@ static inline void findByType(hwloc_obj_t obj, hwloc_obj_type_t type, func lambd
}
static inline size_t countByType(hwloc_topology_t topology, hwloc_obj_type_t type)
{
const int count = hwloc_get_nbobjs_by_type(topology, type);
return count > 0 ? static_cast<size_t>(count) : 0;
}
#ifndef XMRIG_ARM
static inline std::vector<hwloc_obj_t> findByType(hwloc_obj_t obj, hwloc_obj_type_t type)
{
std::vector<hwloc_obj_t> out;
@ -94,14 +103,6 @@ static inline std::vector<hwloc_obj_t> findByType(hwloc_obj_t obj, hwloc_obj_typ
}
static inline size_t countByType(hwloc_topology_t topology, hwloc_obj_type_t type)
{
const int count = hwloc_get_nbobjs_by_type(topology, type);
return count > 0 ? static_cast<size_t>(count) : 0;
}
static inline size_t countByType(hwloc_obj_t obj, hwloc_obj_type_t type)
{
size_t count = 0;
@ -116,6 +117,7 @@ static inline bool isCacheExclusive(hwloc_obj_t obj)
const char *value = hwloc_obj_get_info_by_name(obj, "Inclusive");
return value == nullptr || value[0] != '1';
}
#endif
} // namespace xmrig