aboutsummaryrefslogtreecommitdiff
path: root/c/episodelistview.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-06 16:59:56 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-06 16:59:56 +0200
commitc92d449f7a055769f518a809487f97d8272c4e9d (patch)
tree9fd704fe7c5601c42e86724b7b7c07c2fad6b38b /c/episodelistview.cpp
parent86a0cec08f11de875d25012e5b251a91739ce06c (diff)
downloadEpisodeBrowser-c92d449f7a055769f518a809487f97d8272c4e9d.tar.gz
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.
Diffstat (limited to 'c/episodelistview.cpp')
-rw-r--r--c/episodelistview.cpp6
1 files changed, 1 insertions, 5 deletions
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;