diff options
author | George Hazan <ghazan@miranda.im> | 2018-12-08 20:12:16 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-12-08 20:12:26 +0300 |
commit | 8ffc77be71507825a8f7585bcabff8ccc370206a (patch) | |
tree | aa13a8070f31286db6ad22e17a577e547942f951 /plugins/AVS/src | |
parent | 41b2fdfc654e3eec07c97ceba00cda13d988ffff (diff) |
db_get_sa / db_get_wsa to receive the default value, massive code simplification
Diffstat (limited to 'plugins/AVS/src')
-rw-r--r-- | plugins/AVS/src/utils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp index 4e1d9ea226..844d59b956 100644 --- a/plugins/AVS/src/utils.cpp +++ b/plugins/AVS/src/utils.cpp @@ -92,10 +92,10 @@ int CreateAvatarInCache(MCONTACT hContact, AVATARCACHEENTRY *ace, const char *sz }
else {
if (hContact == 0) { // create a protocol picture in the proto picture cache
- if (tszValue = db_get_wsa(NULL, PPICT_MODULE, szProto))
+ if (tszValue = db_get_wsa(0, PPICT_MODULE, szProto))
MyPathToAbsolute(tszValue, tszFilename);
else if (mir_strcmp(szProto, AVS_DEFAULT)) {
- if (tszValue = db_get_wsa(NULL, PPICT_MODULE, AVS_DEFAULT))
+ if (tszValue = db_get_wsa(0, PPICT_MODULE, AVS_DEFAULT))
MyPathToAbsolute(tszValue, tszFilename);
if (!strstr(szProto, "Global avatar for")) {
@@ -104,7 +104,7 @@ int CreateAvatarInCache(MCONTACT hContact, AVATARCACHEENTRY *ace, const char *sz return -1;
char key[MAX_PATH];
mir_snprintf(key, "Global avatar for %s accounts", pdescr->szProtoName);
- if (tszValue = db_get_wsa(NULL, PPICT_MODULE, key))
+ if (tszValue = db_get_wsa(0, PPICT_MODULE, key))
MyPathToAbsolute(tszValue, tszFilename);
}
}
@@ -130,7 +130,7 @@ int CreateAvatarInCache(MCONTACT hContact, AVATARCACHEENTRY *ace, const char *sz else
MultiByteToWideChar(CP_ACP, 0, szFileName, -1, tszFilename, _countof(tszFilename));
}
- else if (tszValue = db_get_wsa(NULL, szProto, "AvatarFile"))
+ else if (tszValue = db_get_wsa(0, szProto, "AvatarFile"))
MyPathToAbsolute(tszValue, tszFilename);
else return -1;
}
|