From 1c0172cca4f1e90679321912e20436a7f42f122d Mon Sep 17 00:00:00 2001 From: Goraf <22941576+Goraf@users.noreply.github.com> Date: Sat, 24 Feb 2018 15:32:06 +0100 Subject: more nullptr --- plugins/UserInfoEx/src/classMAnnivDate.h | 6 +++--- plugins/UserInfoEx/src/ctrl_annivedit.h | 2 +- plugins/UserInfoEx/src/dlg_propsheet.h | 6 +++--- plugins/UserInfoEx/src/ex_import/classExImContactBase.h | 12 ++++++------ plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h | 10 +++++----- plugins/UserInfoEx/src/mir_contactqueue.h | 8 ++++---- plugins/UserInfoEx/src/mir_db.h | 6 +++--- 7 files changed, 25 insertions(+), 25 deletions(-) (limited to 'plugins/UserInfoEx/src') diff --git a/plugins/UserInfoEx/src/classMAnnivDate.h b/plugins/UserInfoEx/src/classMAnnivDate.h index e6f328b0c0..987408cb63 100644 --- a/plugins/UserInfoEx/src/classMAnnivDate.h +++ b/plugins/UserInfoEx/src/classMAnnivDate.h @@ -89,14 +89,14 @@ public: int CompareDays(MTime mt) const; MZodiac Zodiac(); - int Age(MTime *pNow = NULL); + int Age(MTime *pNow = nullptr); void Clear(); // read date from database int DBGetDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear); int DBGetDateStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting); int DBGetAnniversaryDate(MCONTACT hContact, WORD iIndex); - int DBGetBirthDate(MCONTACT hContact, LPSTR pszProto = NULL); + int DBGetBirthDate(MCONTACT hContact, LPSTR pszProto = nullptr); int DBGetReminderOpts(MCONTACT hContact); // write date to database @@ -109,7 +109,7 @@ public: int DBDeleteBirthDate(MCONTACT hContact); int DBMoveBirthDate(MCONTACT hContact, BYTE bOld, BYTE bNew); - int BackupBirthday (MCONTACT hContact, LPSTR pszProto = NULL, const BYTE bDontIgnoreAnything = FALSE, PWORD lastAnswer = NULL); + int BackupBirthday (MCONTACT hContact, LPSTR pszProto = nullptr, const BYTE bDontIgnoreAnything = FALSE, PWORD lastAnswer = nullptr); // setting values void SetDate(const SYSTEMTIME &st); diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.h b/plugins/UserInfoEx/src/ctrl_annivedit.h index 2c0045d00f..f8656aefc3 100644 --- a/plugins/UserInfoEx/src/ctrl_annivedit.h +++ b/plugins/UserInfoEx/src/ctrl_annivedit.h @@ -53,7 +53,7 @@ class CAnnivEditCtrl : public CBaseCtrl public: - MAnnivDate* Current() { return CurrentItemValid() ? _pDates[_curDate] : NULL; }; + MAnnivDate* Current() { return CurrentItemValid() ? _pDates[_curDate] : nullptr; }; WORD CurrentIndex() const { return _curDate; }; WORD NumDates() const { return _numDates; }; BYTE ReminderEnabled() const { return _ReminderEnabled; }; diff --git a/plugins/UserInfoEx/src/dlg_propsheet.h b/plugins/UserInfoEx/src/dlg_propsheet.h index 4de3112d21..a71addd386 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.h +++ b/plugins/UserInfoEx/src/dlg_propsheet.h @@ -151,7 +151,7 @@ public: ~CPsTree(); __inline void BeginDrag(HTREEITEM hDragItem) { _isDragging = TRUE; _hDragItem = hDragItem; }; - __inline void EndDrag() { _isDragging = FALSE; _hDragItem = NULL; }; + __inline void EndDrag() { _isDragging = FALSE; _hDragItem = nullptr; }; __inline BYTE IsDragging() const { return _isDragging; }; __inline HTREEITEM DragItem() const { return _hDragItem; }; @@ -165,8 +165,8 @@ public: __inline HIMAGELIST ImageList() const { return _hImages; }; __inline BYTE IsIndexValid(const int index) const { return (index >= 0 && index < _numItems); }; - __inline CPsTreeItem* TreeItem(int index) const { return (IsIndexValid(index) ? _pItems[index] : NULL); }; - __inline HTREEITEM TreeItemHandle(int index) const { return (IsIndexValid(index) ? _pItems[index]->Hti() : NULL); }; + __inline CPsTreeItem* TreeItem(int index) const { return (IsIndexValid(index) ? _pItems[index] : nullptr); }; + __inline HTREEITEM TreeItemHandle(int index) const { return (IsIndexValid(index) ? _pItems[index]->Hti() : nullptr); }; __inline int CurrentItemIndex() const { return _curItem; }; __inline CPsTreeItem* CurrentItem() const { return TreeItem(CurrentItemIndex()); }; diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h index d24ffd5f8d..ad89480259 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h @@ -49,12 +49,12 @@ public: __inline DBVARIANT& uid() { return _dbvUID; } __inline MCONTACT handle() const { return _hContact; } - __inline void disp(LPCSTR val) { _pszDisp = val ? mir_strdup(val): NULL; } - __inline void group(LPCSTR val) { _pszGroup = val ? mir_strdup(val): NULL; } - __inline void nick(LPCSTR val) { _pszNick = val ? mir_strdup(val): NULL; } - __inline void proto(LPCSTR val) { _pszProto = val ? mir_strdup(val): NULL; } - __inline void ampro(LPCSTR val) { _pszAMPro = val ? mir_strdup(val): NULL; } - __inline void uidk(LPCSTR val) { _pszUIDKey = val ? mir_strdup(val): NULL; } + __inline void disp(LPCSTR val) { _pszDisp = val ? mir_strdup(val): nullptr; } + __inline void group(LPCSTR val) { _pszGroup = val ? mir_strdup(val): nullptr; } + __inline void nick(LPCSTR val) { _pszNick = val ? mir_strdup(val): nullptr; } + __inline void proto(LPCSTR val) { _pszProto = val ? mir_strdup(val): nullptr; } + __inline void ampro(LPCSTR val) { _pszAMPro = val ? mir_strdup(val): nullptr; } + __inline void uidk(LPCSTR val) { _pszUIDKey = val ? mir_strdup(val): nullptr; } __inline void uid(BYTE val) { _dbvUID.type = DBVT_BYTE; _dbvUID.bVal = val; } __inline void uid(WORD val) { _dbvUID.type = DBVT_WORD; _dbvUID.wVal = val; } __inline void uid(DWORD val) { _dbvUID.type = DBVT_DWORD; _dbvUID.dVal = val; } diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h index 36fd2b265e..0636d37dd4 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h @@ -75,13 +75,13 @@ private: BYTE _useUtf8; WORD _hasUtf8; - size_t packList(LPIDSTRLIST pList, UINT nList, int iID, size_t *cbRew = NULL); + size_t packList(LPIDSTRLIST pList, UINT nList, int iID, size_t *cbRew = nullptr); BYTE GetSetting(const CHAR *pszModule, const CHAR *pszSetting, DBVARIANT *dbv); - size_t packDB(const CHAR *pszModule, const CHAR *pszSetting, size_t *cbRew = NULL); - size_t packDBList(const CHAR *pszModule, const CHAR *pszSetting, MIRANDASERVICE GetList, BYTE bSigned = FALSE, size_t *cbRew = NULL); + size_t packDB(const CHAR *pszModule, const CHAR *pszSetting, size_t *cbRew = nullptr); + size_t packDBList(const CHAR *pszModule, const CHAR *pszSetting, MIRANDASERVICE GetList, BYTE bSigned = FALSE, size_t *cbRew = nullptr); - void writeLine(const CHAR *szSet, size_t *cbRew = NULL); - void writeLineEncoded(const CHAR *szSet, size_t *cbRew = NULL); + void writeLine(const CHAR *szSet, size_t *cbRew = nullptr); + void writeLineEncoded(const CHAR *szSet, size_t *cbRew = nullptr); int readLine(LPSTR szVCFSetting, WORD cchSetting); public: diff --git a/plugins/UserInfoEx/src/mir_contactqueue.h b/plugins/UserInfoEx/src/mir_contactqueue.h index 9d224a91f3..ce1e388f80 100644 --- a/plugins/UserInfoEx/src/mir_contactqueue.h +++ b/plugins/UserInfoEx/src/mir_contactqueue.h @@ -75,7 +75,7 @@ public: * @retval TRUE - The item is added to the queue successfully. * @retval FALSE - The item is not added to the queue. **/ - BOOL Add(int waitTime, MCONTACT hContact, void *param = NULL); + BOOL Add(int waitTime, MCONTACT hContact, void *param = nullptr); /** * This method adds the desired new item only, if the queue does not yet contain @@ -88,7 +88,7 @@ public: * @retval TRUE - The item is added to the queue successfully. * @retval FALSE - The item is not added to the queue. **/ - BOOL AddIfDontHave(int waitTime, MCONTACT hContact, void *param = NULL); + BOOL AddIfDontHave(int waitTime, MCONTACT hContact, void *param = nullptr); /** * This method removes all existing queue items for the contact and adds a new queue item @@ -101,7 +101,7 @@ public: * * @return nothing **/ - BOOL AddUnique(int waitTime, MCONTACT hContact, void *param = NULL); + BOOL AddUnique(int waitTime, MCONTACT hContact, void *param = nullptr); /** * This method removes all existing queue items for the contact with the same parameter as @e param @@ -114,7 +114,7 @@ public: * * @return nothing **/ - BOOL AddUniqueConsiderParam (int waitTime, MCONTACT hContact, void *param = NULL); + BOOL AddUniqueConsiderParam (int waitTime, MCONTACT hContact, void *param = nullptr); // This method resumes the worker thread and immitiatly goes on with the next entry. void ContinueWithNext(); diff --git a/plugins/UserInfoEx/src/mir_db.h b/plugins/UserInfoEx/src/mir_db.h index bbf6328c1e..f085c8b87d 100644 --- a/plugins/UserInfoEx/src/mir_db.h +++ b/plugins/UserInfoEx/src/mir_db.h @@ -66,11 +66,11 @@ namespace Setting { static FORCEINLINE BYTE GetAsIsEx(MCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv) { return GetEx(hContact, pszModule, szProto, pszSetting, dbv, 0); } static FORCEINLINE LPSTR GetAStringEx(MCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting) - { DBVARIANT dbv; return (!GetEx(hContact, pszModule, szProto, pszSetting, &dbv, DBVT_ASCIIZ) && dbv.type == DBVT_ASCIIZ) ? dbv.pszVal : NULL; } + { DBVARIANT dbv; return (!GetEx(hContact, pszModule, szProto, pszSetting, &dbv, DBVT_ASCIIZ) && dbv.type == DBVT_ASCIIZ) ? dbv.pszVal : nullptr; } static FORCEINLINE LPWSTR GetWStringEx(MCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting) - { DBVARIANT dbv; return (!GetEx(hContact, pszModule, szProto, pszSetting, &dbv, DBVT_WCHAR) && dbv.type == DBVT_WCHAR) ? dbv.pwszVal : NULL; } + { DBVARIANT dbv; return (!GetEx(hContact, pszModule, szProto, pszSetting, &dbv, DBVT_WCHAR) && dbv.type == DBVT_WCHAR) ? dbv.pwszVal : nullptr; } static FORCEINLINE LPSTR GetUStringEx(MCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting) - { DBVARIANT dbv; return (!GetEx(hContact, pszModule, szProto, pszSetting, &dbv, DBVT_UTF8) && dbv.type == DBVT_UTF8) ? dbv.pszVal : NULL; } + { DBVARIANT dbv; return (!GetEx(hContact, pszModule, szProto, pszSetting, &dbv, DBVT_UTF8) && dbv.type == DBVT_UTF8) ? dbv.pszVal : nullptr; } WORD GetCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE nType); static FORCEINLINE WORD GetAsIsCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv) -- cgit v1.2.3