From 70c13e5c4475aedd296c51e68070e85096eb4f39 Mon Sep 17 00:00:00 2001 From: aunsane Date: Thu, 21 Dec 2017 16:08:58 +0300 Subject: Tox: improved profile encription management --- include/m_system_cpp.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/m_system_cpp.h b/include/m_system_cpp.h index e26ef5a3de..11ccbfc0b2 100644 --- a/include/m_system_cpp.h +++ b/include/m_system_cpp.h @@ -92,9 +92,8 @@ public: __inline explicit pass_ptrA(char *_p) : mir_ptr(_p) {} __inline ~pass_ptrA() { zero(); } __inline char* operator = (char *_p){ zero(); return mir_ptr::operator=(_p); } - __inline void zero() - { - if (data) SecureZeroMemory(data, mir_strlen(data)); + __inline void zero() { + if (data) SecureZeroMemory(data, mir_strlen(data)); } }; @@ -105,14 +104,11 @@ public: __inline explicit pass_ptrW(wchar_t *_p) : mir_ptr(_p) {} __inline ~pass_ptrW() { zero(); } __inline wchar_t* operator = (wchar_t *_p){ zero(); return mir_ptr::operator=(_p); } - __inline void zero() - { - if (data) SecureZeroMemory(data, mir_wstrlen(data)*sizeof(wchar_t)); + __inline void zero() { + if (data) SecureZeroMemory(data, mir_wstrlen(data)*sizeof(wchar_t)); } }; -typedef pass_ptrW pass_ptrT; - /////////////////////////////////////////////////////////////////////////////// // mir_cslockfull - controllable locker for the critical sections -- cgit v1.2.3