1
0
mirror of https://github.com/xmrig/xmrig.git synced 2026-01-02 00:12:38 -05:00

replace new/delete with sp

This commit is contained in:
4ertus2
2024-10-20 08:24:09 +03:00
parent e32731b60b
commit ab5be0b773
71 changed files with 271 additions and 387 deletions

View File

@@ -49,7 +49,7 @@ public:
protected:
inline bool isActive() const override { return m_active >= 0; }
inline IClient *client() const override { return isActive() ? active() : m_pools[m_index]; }
inline IClient* client() const override { return isActive() ? active() : m_pools[m_index].get(); }
int64_t submit(const JobResult &result) override;
void connect() override;
@@ -67,7 +67,7 @@ protected:
void onVerifyAlgorithm(const IClient *client, const Algorithm &algorithm, bool *ok) override;
private:
inline IClient *active() const { return m_pools[static_cast<size_t>(m_active)]; }
inline IClient* active() const { return m_pools[static_cast<size_t>(m_active)].get(); }
const bool m_quiet;
const int m_retries;
@@ -75,7 +75,7 @@ private:
int m_active = -1;
IStrategyListener *m_listener;
size_t m_index = 0;
std::vector<IClient*> m_pools;
std::vector<std::shared_ptr<IClient>> m_pools;
};