diff options
author | George Hazan <ghazan@miranda.im> | 2018-01-26 22:31:20 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-01-26 22:31:27 +0300 |
commit | 391980ce1e890445542441eeb5d9f9cc18ae1baf (patch) | |
tree | ee1b165175dcdaeeaabd2ddb822542e648663a90 /plugins/SMS | |
parent | bf8ad124d03b4fd059318d9ba8889b11faaf5b53 (diff) |
code optimization
Diffstat (limited to 'plugins/SMS')
-rw-r--r-- | plugins/SMS/src/SMS_svc.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp index 330c089f08..ee3b8dc53c 100644 --- a/plugins/SMS/src/SMS_svc.cpp +++ b/plugins/SMS/src/SMS_svc.cpp @@ -8,9 +8,9 @@ int LoadServices(void) pszServiceFunctionName = szServiceFunction + PROTOCOL_NAME_LEN;
// Service creation
- for (size_t i = 0; i < _countof(siPluginServices); i++) {
- memcpy(pszServiceFunctionName, siPluginServices[i].lpszName, (mir_strlen(siPluginServices[i].lpszName) + 1));
- CreateServiceFunction(szServiceFunction, (MIRANDASERVICE)siPluginServices[i].lpFunc);
+ for (auto &it : siPluginServices) {
+ memcpy(pszServiceFunctionName, it.lpszName, (mir_strlen(it.lpszName) + 1));
+ CreateServiceFunction(szServiceFunction, (MIRANDASERVICE)it.lpFunc);
}
return 0;
}
|