diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2015-03-01 17:38:59 +0300 |
---|---|---|
committer | Kacper Michajłow <kasper93@gmail.com> | 2015-03-02 01:19:08 +0300 |
commit | 3d4b2ddb05290322fb3b362d8e09b4e4ca2ba596 (patch) | |
tree | def662b40363aed26773cc83fee1ef93477a0c8c /src/filters/transform | |
parent | 0e9c363560faa6149327a09aa26135659ba9ba6a (diff) |
Suppress type mismatch warnings.
Diffstat (limited to 'src/filters/transform')
-rw-r--r-- | src/filters/transform/VSFilter/Copy.cpp | 6 | ||||
-rw-r--r-- | src/filters/transform/VSFilter/DirectVobSub.cpp | 10 | ||||
-rw-r--r-- | src/filters/transform/VSFilter/StyleEditorDialog.cpp | 5 |
3 files changed, 11 insertions, 10 deletions
diff --git a/src/filters/transform/VSFilter/Copy.cpp b/src/filters/transform/VSFilter/Copy.cpp index 3d9293b0e..b6c65e0d8 100644 --- a/src/filters/transform/VSFilter/Copy.cpp +++ b/src/filters/transform/VSFilter/Copy.cpp @@ -1,6 +1,6 @@ /*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -44,7 +44,7 @@ void BltLineRGB32(DWORD* d, BYTE* sub, int w, const GUID& subtype) for (; db < dbtend; sub += 4, db++) {
if (sub[3] < 0xff) {
int y = (c2y_yb[sub[0]] + c2y_yg[sub[1]] + c2y_yr[sub[2]] + 0x108000) >> 16;
- *db = y; // w/o colors
+ *db = BYTE(y); // w/o colors
}
}
} else if (subtype == MEDIASUBTYPE_YUY2) {
@@ -54,7 +54,7 @@ void BltLineRGB32(DWORD* d, BYTE* sub, int w, const GUID& subtype) for (; ds < dstend; sub += 4, ds++) {
if (sub[3] < 0xff) {
int y = (c2y_yb[sub[0]] + c2y_yg[sub[1]] + c2y_yr[sub[2]] + 0x108000) >> 16;
- *ds = 0x8000 | y; // w/o colors
+ *ds = WORD(0x8000 | y); // w/o colors
}
}
} else if (subtype == MEDIASUBTYPE_RGB555) {
diff --git a/src/filters/transform/VSFilter/DirectVobSub.cpp b/src/filters/transform/VSFilter/DirectVobSub.cpp index e9fb9ead8..f8cdc9b1c 100644 --- a/src/filters/transform/VSFilter/DirectVobSub.cpp +++ b/src/filters/transform/VSFilter/DirectVobSub.cpp @@ -1,6 +1,6 @@ /*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -300,12 +300,12 @@ STDMETHODIMP CDirectVobSub::get_TextSettings(void* lf, int lflen, COLORREF* colo return E_INVALIDARG;
}
- ((LOGFONT*)lf)->lfCharSet = m_defStyle.charSet;
- ((LOGFONT*)lf)->lfItalic = m_defStyle.fItalic;
+ ((LOGFONT*)lf)->lfCharSet = (BYTE)m_defStyle.charSet;
+ ((LOGFONT*)lf)->lfItalic = (BYTE)m_defStyle.fItalic;
((LOGFONT*)lf)->lfHeight = (LONG)m_defStyle.fontSize;
((LOGFONT*)lf)->lfWeight = m_defStyle.fontWeight;
- ((LOGFONT*)lf)->lfStrikeOut = m_defStyle.fStrikeOut;
- ((LOGFONT*)lf)->lfUnderline = m_defStyle.fUnderline;
+ ((LOGFONT*)lf)->lfStrikeOut = (BYTE)m_defStyle.fStrikeOut;
+ ((LOGFONT*)lf)->lfUnderline = (BYTE)m_defStyle.fUnderline;
}
if (color) {
diff --git a/src/filters/transform/VSFilter/StyleEditorDialog.cpp b/src/filters/transform/VSFilter/StyleEditorDialog.cpp index 806e6cff5..3e4e47734 100644 --- a/src/filters/transform/VSFilter/StyleEditorDialog.cpp +++ b/src/filters/transform/VSFilter/StyleEditorDialog.cpp @@ -1,6 +1,6 @@ /*
* (C) 2003-2006 Gabest
- * (C) 2006-2014 see Authors.txt
+ * (C) 2006-2015 see Authors.txt
*
* This file is part of MPC-HC.
*
@@ -193,7 +193,8 @@ void CStyleEditorDialog::OnOK() m_stss.marginRect = m_margin;
for (size_t i = 0; i < m_alpha.size(); i++) {
- m_stss.alpha[i] = BYTE_MAX - m_alpha[i];
+ ASSERT(m_alpha[i] <= BYTE_MAX);
+ m_stss.alpha[i] = BYTE_MAX - BYTE(m_alpha[i]);
}
__super::OnOK();
|