mirror of
https://github.com/xmrig/xmrig.git
synced 2025-12-17 11:32:40 -05:00
Make Process::location static.
This commit is contained in:
@@ -31,7 +31,10 @@
|
||||
#include "base/tools/Chrono.h"
|
||||
|
||||
|
||||
static size_t location(xmrig::Process::Location location, char *buf, size_t max)
|
||||
namespace xmrig {
|
||||
|
||||
|
||||
static size_t getLocation(Process::Location location, char *buf, size_t max)
|
||||
{
|
||||
using namespace xmrig;
|
||||
|
||||
@@ -48,6 +51,9 @@ static size_t location(xmrig::Process::Location location, char *buf, size_t max)
|
||||
}
|
||||
|
||||
|
||||
} // namespace xmrig
|
||||
|
||||
|
||||
xmrig::Process::Process(int argc, char **argv) :
|
||||
m_arguments(argc, argv)
|
||||
{
|
||||
@@ -55,12 +61,12 @@ xmrig::Process::Process(int argc, char **argv) :
|
||||
}
|
||||
|
||||
|
||||
xmrig::String xmrig::Process::location(Location location, const char *fileName) const
|
||||
xmrig::String xmrig::Process::location(Location location, const char *fileName)
|
||||
{
|
||||
constexpr const size_t max = 520;
|
||||
|
||||
char *buf = new char[max]();
|
||||
size_t size = ::location(location, buf, max);
|
||||
size_t size = getLocation(location, buf, max);
|
||||
|
||||
if (size == 0) {
|
||||
delete [] buf;
|
||||
|
||||
Reference in New Issue
Block a user