From c92d449f7a055769f518a809487f97d8272c4e9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sat, 6 Aug 2022 16:59:56 +0200 Subject: Update Hungarian notation for buffer sizes. For string lengths EXCLUDING NUL, I use len, whereas cb and cch are used for string lengths INCLUDING NUL. cb = byte count = sizeof(a) = narrow string length cch = character count = sizeof(a)/sizeof(*a) = string length cb and cch are equivalent for narrow strings. I prefer cch. --- c/episodelistview.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'c/episodelistview.cpp') diff --git a/c/episodelistview.cpp b/c/episodelistview.cpp index 3ecaab1..7cbbcca 100644 --- a/c/episodelistview.cpp +++ b/c/episodelistview.cpp @@ -265,15 +265,11 @@ int CALLBACK EpisodeListView::SortProc(const LPARAM iItem1, const LPARAM iItem2, { Mark m; WcharPtr s1, s2; - int cch, cch1, cch2; if (!Pl("episode_data","episode_title",lvi1.lParam,&s1)) return 0; if (!Pl("episode_data","episode_title",lvi2.lParam,&s2)) return 0; - cch1 = wcslen(s1); - cch2 = wcslen(s2); - cch = cch1 > cch2? cch2: cch1; - return order*_wcsnicmp(s1, s2, cch); + return order*_wcsicmp(s1, s2); } default: return 0; -- cgit v1.2.3