Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUnderground78 <underground78@users.sourceforge.net>2012-05-19 20:17:33 +0400
committerUnderground78 <underground78@users.sourceforge.net>2012-05-19 20:17:33 +0400
commit62027be3b2b59998a50b50d7be184676f2a90f15 (patch)
tree16ec7654489faaacf8a5a38934f3e1abcf4b172e /src/filters/transform/Mpeg2DecFilter
parent0aeeed3651f2c235b64b0cdbd3e5a27143208d11 (diff)
Use Microsoft's _countof macro when it exists since its C++ implementation is safer than just doing sizeof(array)/sizeof(array[0])
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@4801 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/transform/Mpeg2DecFilter')
-rw-r--r--src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.cpp10
-rw-r--r--src/filters/transform/Mpeg2DecFilter/Mpeg2DecSettingsWnd.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.cpp b/src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.cpp
index a79af0e96..89e075335 100644
--- a/src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.cpp
+++ b/src/filters/transform/Mpeg2DecFilter/Mpeg2DecFilter.cpp
@@ -63,12 +63,12 @@ const AMOVIESETUP_MEDIATYPE sudPinTypesOut[] = {
};
const AMOVIESETUP_PIN sudpPins[] = {
- {L"Input", FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, NULL, countof(sudPinTypesIn), sudPinTypesIn},
- {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, NULL, countof(sudPinTypesOut), sudPinTypesOut}
+ {L"Input", FALSE, FALSE, FALSE, FALSE, &CLSID_NULL, NULL, _countof(sudPinTypesIn), sudPinTypesIn},
+ {L"Output", FALSE, TRUE, FALSE, FALSE, &CLSID_NULL, NULL, _countof(sudPinTypesOut), sudPinTypesOut}
};
const AMOVIESETUP_FILTER sudFilter[] = {
- {&__uuidof(CMpeg2DecFilter), Mpeg2DecFilterName, 0x00600001, countof(sudpPins), sudpPins, CLSID_LegacyAmFilterCategory},
+ {&__uuidof(CMpeg2DecFilter), Mpeg2DecFilterName, 0x00600001, _countof(sudpPins), sudpPins, CLSID_LegacyAmFilterCategory},
};
CFactoryTemplate g_Templates[] = {
@@ -76,7 +76,7 @@ CFactoryTemplate g_Templates[] = {
{L"CMpeg2DecPropertyPage", &__uuidof(CMpeg2DecSettingsWnd), CreateInstance<CInternalPropertyPageTempl<CMpeg2DecSettingsWnd> >},
};
-int g_cTemplates = countof(g_Templates);
+int g_cTemplates = _countof(g_Templates);
STDAPI DllRegisterServer()
{
@@ -398,7 +398,7 @@ void CMpeg2DecFilter::InputTypeChanged()
TRACE(_T("ResetMpeg2Decoder()\n"));
- for (int i = 0; i < countof(m_dec->m_pictures); i++) {
+ for (int i = 0; i < _countof(m_dec->m_pictures); i++) {
m_dec->m_pictures[i].rtStart = m_dec->m_pictures[i].rtStop = _I64_MIN+1;
m_dec->m_pictures[i].fDelivered = false;
m_dec->m_pictures[i].flags &= ~PIC_MASK_CODING_TYPE;
diff --git a/src/filters/transform/Mpeg2DecFilter/Mpeg2DecSettingsWnd.cpp b/src/filters/transform/Mpeg2DecFilter/Mpeg2DecSettingsWnd.cpp
index bd9c7b92f..e51a4997f 100644
--- a/src/filters/transform/Mpeg2DecFilter/Mpeg2DecSettingsWnd.cpp
+++ b/src/filters/transform/Mpeg2DecFilter/Mpeg2DecSettingsWnd.cpp
@@ -121,7 +121,7 @@ bool CMpeg2DecSettingsWnd::OnActivate()
p.y += m_fontheight + 20;
- for (int i = 0, h = max(20, m_fontheight)+1; i < countof(m_procamp_slider); i++, p.y += h) {
+ for (int i = 0, h = max(20, m_fontheight)+1; i < _countof(m_procamp_slider); i++, p.y += h) {
static const TCHAR* labels[] = {m_strBrightness, m_strContrast, m_strHue, m_strSaturation};
m_procamp_static[i].Create(labels[i], dwStyle, CRect(p, CSize(70, h)), this);
m_procamp_slider[i].Create(dwStyle, CRect(p + CPoint(80, 0), CSize(201, h)), this, IDC_PP_SLIDER1+i);