mirror of
https://github.com/xmrig/xmrig.git
synced 2024-11-18 10:01:06 +00:00
Reduced PciTopology class size.
This commit is contained in:
parent
56e070b3d1
commit
18bf9d3d95
1 changed files with 9 additions and 8 deletions
|
@ -40,12 +40,12 @@ class PciTopology
|
|||
{
|
||||
public:
|
||||
PciTopology() = default;
|
||||
PciTopology(uint32_t bus, uint32_t device, uint32_t function) : m_bus(bus), m_device(device), m_function(function) {}
|
||||
PciTopology(uint32_t bus, uint32_t device, uint32_t function) : m_valid(true), m_bus(bus), m_device(device), m_function(function) {}
|
||||
|
||||
inline bool isValid() const { return m_bus >= 0; }
|
||||
inline uint32_t bus() const { return isValid() ? m_bus : 0; }
|
||||
inline uint32_t device() const { return m_device; }
|
||||
inline uint32_t function() const { return m_function; }
|
||||
inline bool isValid() const { return m_valid; }
|
||||
inline uint8_t bus() const { return m_bus; }
|
||||
inline uint8_t device() const { return m_device; }
|
||||
inline uint8_t function() const { return m_function; }
|
||||
|
||||
String toString() const
|
||||
{
|
||||
|
@ -60,9 +60,10 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
int32_t m_bus = -1;
|
||||
uint32_t m_device = 0;
|
||||
uint32_t m_function = 0;
|
||||
bool m_valid = false;
|
||||
uint8_t m_bus = 0;
|
||||
uint8_t m_device = 0;
|
||||
uint8_t m_function = 0;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue