Make Process::location static.
This commit is contained in:
parent
c44ae06d54
commit
bdf12bca0f
4 changed files with 13 additions and 7 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue