Make Process::location static.

This commit is contained in:
XMRig 2019-12-22 13:26:06 +07:00
parent c44ae06d54
commit bdf12bca0f
No known key found for this signature in database
GPG key ID: 446A53638BE94409
4 changed files with 13 additions and 7 deletions

View file

@ -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;