diff options
| author | 2016-05-01 16:16:09 +0100 | |
|---|---|---|
| committer | 2016-05-01 16:16:09 +0100 | |
| commit | fe375f69972cd912739c0d68fa4951d35de90e5e (patch) | |
| tree | 71bd2c2b59d6be62d7c18588a417e5aa39ab233c /src/modules/dcc/requests.cpp | |
| parent | libkvidcc: fix $dcc.currentSpeed documentation add missing @short and fix rig... (diff) | |
| parent | Apply clang-tidy: modernize-loop-convert (diff) | |
| download | KVIrc-fe375f69972cd912739c0d68fa4951d35de90e5e.tar.gz KVIrc-fe375f69972cd912739c0d68fa4951d35de90e5e.tar.bz2 KVIrc-fe375f69972cd912739c0d68fa4951d35de90e5e.zip | |
Merge pull request #1962 from DarthGandalf/modernize
Apply several fixes of clang-tidy
Diffstat (limited to 'src/modules/dcc/requests.cpp')
| -rw-r--r-- | src/modules/dcc/requests.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/dcc/requests.cpp b/src/modules/dcc/requests.cpp index d27ea9b65..2fa80d575 100644 --- a/src/modules/dcc/requests.cpp +++ b/src/modules/dcc/requests.cpp @@ -307,7 +307,7 @@ static void dccModuleParseDccChat(KviDccRequest * dcc) } d->setZeroPortRequestTag(dcc->szParam4.ptr()); QString tmp; - if(!dcc_kvs_get_listen_ip_address(0, d->console(), tmp)) + if(!dcc_kvs_get_listen_ip_address(nullptr, d->console(), tmp)) d->szListenIp = "0.0.0.0"; else d->szListenIp = tmp; @@ -521,7 +521,7 @@ static void dccModuleParseDccSend(KviDccRequest * dcc) } d->setZeroPortRequestTag(dcc->szParam5.ptr()); QString tmp; - if(!dcc_kvs_get_listen_ip_address(0, d->console(), tmp)) + if(!dcc_kvs_get_listen_ip_address(nullptr, d->console(), tmp)) d->szListenIp = "0.0.0.0"; else d->szListenIp = QString(tmp); @@ -706,7 +706,7 @@ static void dccModuleParseDccRecv(KviDccRequest * dcc) d->bActive = true; dcc_module_set_dcc_type(d, "SEND"); d->triggerCreationEvent(); - g_pDccBroker->sendFileExecute(0, d); + g_pDccBroker->sendFileExecute(nullptr, d); return; } @@ -801,7 +801,7 @@ static void dccModuleParseDccRSend(KviDccRequest * dcc) d->szIp = __tr2qs_ctx("(unknown)", "dcc"); d->szPort = d->szIp; QString tmp; - if(!dcc_kvs_get_listen_ip_address(0, d->console(), tmp)) + if(!dcc_kvs_get_listen_ip_address(nullptr, d->console(), tmp)) { d->console()->output(KVI_OUT_DCCMSG, __tr2qs_ctx("No suitable interface to listen on, trying to continue anyway...", "dcc")); @@ -949,7 +949,7 @@ static void dccModuleParseDccGet(KviDccRequest * dcc) dcc_fill_local_nick_user_host(d, dcc); QString tmp; - if(!dcc_kvs_get_listen_ip_address(0, d->console(), tmp)) + if(!dcc_kvs_get_listen_ip_address(nullptr, d->console(), tmp)) { d->console()->output(KVI_OUT_DCCMSG, __tr2qs_ctx("No suitable interface to listen on, trying to continue anyway...", "dcc")); @@ -992,7 +992,7 @@ static void dccModuleParseDccGet(KviDccRequest * dcc) &(o->absFilePath()), &(d->szType)); } d->triggerCreationEvent(); - g_pDccBroker->sendFileExecute(0, d); + g_pDccBroker->sendFileExecute(nullptr, d); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -1246,11 +1246,11 @@ KVIMODULEEXPORTFUNC void dccModuleCtcpDccParseRoutine(KviDccRequest * dcc) { dcc->szType.toUpper(); - for(int i = 0; i < KVI_NUM_KNOWN_DCC_TYPES; i++) + for(auto & i : dccParseProcTable) { - if(kvi_strEqualCS(dccParseProcTable[i].type, dcc->szType.ptr())) + if(kvi_strEqualCS(i.type, dcc->szType.ptr())) { - (dccParseProcTable[i].proc)(dcc); + (i.proc)(dcc); return; } } |
