Skip to content

Commit cda0ec1

Browse files
committed
PPageFileInfoClip: Use CComBSTR Length method when possible.
1 parent a8945e1 commit cda0ec1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/mpc-hc/PPageFileInfoClip.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,23 +134,23 @@ BOOL CPPageFileInfoClip::OnInitDialog()
134134
BeginEnumFilters(m_pFG, pEF, pBF) {
135135
if (CComQIPtr<IAMMediaContent, &IID_IAMMediaContent> pAMMC = pBF) {
136136
CComBSTR bstr;
137-
if (SUCCEEDED(pAMMC->get_Title(&bstr)) && wcslen(bstr.m_str) > 0) {
137+
if (SUCCEEDED(pAMMC->get_Title(&bstr)) && bstr.Length()) {
138138
m_clip = bstr.m_str;
139139
fEmpty = false;
140140
}
141-
if (SUCCEEDED(pAMMC->get_AuthorName(&bstr)) && wcslen(bstr.m_str) > 0) {
141+
if (SUCCEEDED(pAMMC->get_AuthorName(&bstr)) && bstr.Length()) {
142142
m_author = bstr.m_str;
143143
fEmpty = false;
144144
}
145-
if (SUCCEEDED(pAMMC->get_Copyright(&bstr)) && wcslen(bstr.m_str) > 0) {
145+
if (SUCCEEDED(pAMMC->get_Copyright(&bstr)) && bstr.Length()) {
146146
m_copyright = bstr.m_str;
147147
fEmpty = false;
148148
}
149-
if (SUCCEEDED(pAMMC->get_Rating(&bstr)) && wcslen(bstr.m_str) > 0) {
149+
if (SUCCEEDED(pAMMC->get_Rating(&bstr)) && bstr.Length()) {
150150
m_rating = bstr.m_str;
151151
fEmpty = false;
152152
}
153-
if (SUCCEEDED(pAMMC->get_Description(&bstr)) && wcslen(bstr.m_str) > 0) {
153+
if (SUCCEEDED(pAMMC->get_Description(&bstr)) && bstr.Length()) {
154154
m_desc.SetWindowText(CString(bstr.m_str));
155155
fEmpty = false;
156156
}

0 commit comments

Comments
 (0)