diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-30 03:14:13 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-30 03:14:13 +0200 |
commit | ebabd34385feb629b759216c1f7d85edc20bf2fd (patch) | |
tree | 432e68a6a58bcaf4bc1dd3c5ae438157f09f4d4a /README | |
parent | d485eb2bf7e0a82702afec9387f21bf0f89c985f (diff) | |
download | EpisodeBrowser-ebabd34385feb629b759216c1f7d85edc20bf2fd.tar.gz |
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.
Diffstat (limited to 'README')
-rw-r--r-- | README | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -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 |