Code cleanup based on Clang-Tidy.
This commit is contained in:
parent
3215403815
commit
c7ac314110
133 changed files with 437 additions and 833 deletions
|
@ -16,7 +16,6 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include <uv.h>
|
||||
|
||||
|
||||
|
@ -198,7 +197,7 @@ void xmrig::Api::genId(const String &id)
|
|||
return;
|
||||
}
|
||||
|
||||
uv_interface_address_t *interfaces;
|
||||
uv_interface_address_t *interfaces = nullptr;
|
||||
int count = 0;
|
||||
|
||||
if (uv_interface_addresses(&interfaces, &count) < 0) {
|
||||
|
|
|
@ -95,6 +95,7 @@ bool xmrig::Httpd::start()
|
|||
m_port = static_cast<uint16_t>(rc);
|
||||
|
||||
# ifdef _WIN32
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast, performance-no-int-to-ptr)
|
||||
HRSRC src = FindResource(nullptr, MAKEINTRESOURCE(1), RT_ICON);
|
||||
if (src != nullptr) {
|
||||
HGLOBAL res = LoadResource(nullptr, src);
|
||||
|
|
|
@ -45,6 +45,9 @@ static inline const char *rpcError(int code) {
|
|||
|
||||
case IApiRequest::RPC_INVALID_PARAMS:
|
||||
return "Invalid params";
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (code >= 400 && code < 600) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue