From ebabd34385feb629b759216c1f7d85edc20bf2fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sat, 30 Jul 2022 03:14:13 +0200 Subject: Add wstring_owner, replacing std::wstring. std::basic_string is nice, but it is not very ergonomic if everything you really need is to automatically free C strings at end of scope. I suppose I could have used std::unique_ptr for this, but I suspect the ergonomics would be worse. --- README | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'README') diff --git a/README b/README index d7c644f..b492c53 100644 --- a/README +++ b/README @@ -62,17 +62,16 @@ Following is a summary of some coding conventions used in the project. - p = pointer - b = bool, BOOL, int (boolean value) - - i = integer + - i = int - h = handle - - hX = X handle (e.g., hWnd = HWND) - - l = long, LPARAM - - w = WORD, WPARAM + - l = long, (LPARAM) + - w = unsigned short, WORD, (WPARAM) - dw = DWORD - lvi = LVITEM - - sz = unmanaged, zero-terminated narrow string (char*) - - wsz = unmanaged, zero-terminated wide string (wchar_t*) - - s = managed narrow string (std::string) - - ws = managed wide string (std::wstring) + - sz = char* + - wsz = wchar_t* + - ws = std::wstring + - wso = wstring_owner The list above is non-exhaustive. Variables whose type is unknown (in templates) do not need prefixes. Some very common self-explanatory -- cgit v1.2.3