mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-11 05:14:40 +00:00
Code cleanup.
This commit is contained in:
parent
6f8ffb7660
commit
0b7dfaabe0
2 changed files with 6 additions and 8 deletions
|
@ -1,7 +1,7 @@
|
||||||
/* XMRig
|
/* XMRig
|
||||||
* Copyright (c) 2014-2019 heapwolf <https://github.com/heapwolf>
|
* Copyright (c) 2014-2019 heapwolf <https://github.com/heapwolf>
|
||||||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
|
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -175,11 +175,9 @@ void xmrig::HttpContext::close(int status)
|
||||||
|
|
||||||
xmrig::HttpContext *xmrig::HttpContext::get(uint64_t id)
|
xmrig::HttpContext *xmrig::HttpContext::get(uint64_t id)
|
||||||
{
|
{
|
||||||
if (storage.count(id) == 0) {
|
const auto it = storage.find(id);
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
return storage[id];
|
return it == storage.end() ? nullptr : it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* XMRig
|
/* XMRig
|
||||||
* Copyright (c) 2014-2019 heapwolf <https://github.com/heapwolf>
|
* Copyright (c) 2014-2019 heapwolf <https://github.com/heapwolf>
|
||||||
* Copyright (c) 2018-2020 SChernykh <https://github.com/SChernykh>
|
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
|
||||||
* Copyright (c) 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify
|
* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
|
Loading…
Reference in a new issue