diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2011-08-11 16:16:46 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2011-08-11 16:16:46 +0400 |
commit | 4af8276527bcbf3051fe66466844ee9d1585279e (patch) | |
tree | 6e6eece6ce5f8b27b700d8100841aba56e4ee5dc /src/Subtitles | |
parent | 3f7915830474bb4a35689f833c9cbb9d959dcbf3 (diff) |
remove unneeded parentheses from return true/false statements
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@3650 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/Subtitles')
-rw-r--r-- | src/Subtitles/RTS.cpp | 44 | ||||
-rw-r--r-- | src/Subtitles/Rasterizer.cpp | 4 | ||||
-rw-r--r-- | src/Subtitles/RenderedHdmvSubtitle.cpp | 2 | ||||
-rw-r--r-- | src/Subtitles/STS.cpp | 78 | ||||
-rw-r--r-- | src/Subtitles/TextFile.cpp | 16 | ||||
-rw-r--r-- | src/Subtitles/USFSubtitles.cpp | 14 | ||||
-rw-r--r-- | src/Subtitles/VobSubFile.cpp | 80 | ||||
-rw-r--r-- | src/Subtitles/VobSubFileRipper.cpp | 58 | ||||
-rw-r--r-- | src/Subtitles/VobSubImage.cpp | 54 |
9 files changed, 175 insertions, 175 deletions
diff --git a/src/Subtitles/RTS.cpp b/src/Subtitles/RTS.cpp index 3b8ada52f..ae6d9f12f 100644 --- a/src/Subtitles/RTS.cpp +++ b/src/Subtitles/RTS.cpp @@ -99,7 +99,7 @@ bool CWord::Append(CWord* w) if(!(m_style == w->m_style)
|| m_fLineBreak || w->m_fLineBreak
|| w->m_kstart != w->m_kend || m_ktype != w->m_ktype) {
- return(false);
+ return false;
}
m_fWhiteSpaceChar = m_fWhiteSpaceChar && w->m_fWhiteSpaceChar;
@@ -109,7 +109,7 @@ bool CWord::Append(CWord* w) m_fDrawn = false;
m_p = CPoint(INT_MAX, INT_MAX);
- return(true);
+ return true;
}
void CWord::Paint(CPoint p, CPoint org)
@@ -173,7 +173,7 @@ void CWord::Transform(CPoint org) bool CWord::CreateOpaqueBox()
{
if(m_pOpaqueBox) {
- return(true);
+ return true;
}
STSStyle style = m_style;
@@ -640,7 +640,7 @@ bool CText::CreatePath() if(!GetTextExtentPoint32W(g_hDC, s, 1, &extent)) {
SelectFont(g_hDC, hOldFont);
ASSERT(0);
- return(false);
+ return false;
}
PartialBeginPath(g_hDC, bFirstPath);
@@ -655,7 +655,7 @@ bool CText::CreatePath() if(!GetTextExtentPoint32W(g_hDC, m_str, m_str.GetLength(), &extent)) {
SelectFont(g_hDC, hOldFont);
ASSERT(0);
- return(false);
+ return false;
}
BeginPath(g_hDC);
@@ -665,7 +665,7 @@ bool CText::CreatePath() SelectFont(g_hDC, hOldFont);
- return(true);
+ return true;
}
// CPolygon
@@ -703,13 +703,13 @@ bool CPolygon::Append(CWord* w) {
CPolygon* p = dynamic_cast<CPolygon*>(w);
if(!p) {
- return(false);
+ return false;
}
// TODO
- return(false);
+ return false;
- //return(true);
+ //return true;
}
bool CPolygon::GetLONG(CStringW& str, LONG& ret)
@@ -728,7 +728,7 @@ bool CPolygon::GetPOINT(CStringW& str, POINT& ret) bool CPolygon::ParseStr()
{
if(m_pathTypesOrg.GetCount() > 0) {
- return(true);
+ return true;
}
CPoint p;
@@ -836,7 +836,7 @@ bool CPolygon::ParseStr() if(lastmoveto == -1 || firstmoveto > 0) {
m_pathTypesOrg.RemoveAll();
m_pathPointsOrg.RemoveAll();
- return(false);
+ return false;
}
int minx = INT_MAX, miny = INT_MAX, maxx = -INT_MAX, maxy = -INT_MAX;
@@ -876,14 +876,14 @@ bool CPolygon::CreatePath() {
size_t len = m_pathTypesOrg.GetCount();
if(len == 0) {
- return(false);
+ return false;
}
if(mPathPoints != len) {
mpPathTypes = (BYTE*)realloc(mpPathTypes, len*sizeof(BYTE));
mpPathPoints = (POINT*)realloc(mpPathPoints, len*sizeof(POINT));
if(!mpPathTypes || !mpPathPoints) {
- return(false);
+ return false;
}
mPathPoints = len;
}
@@ -891,7 +891,7 @@ bool CPolygon::CreatePath() memcpy(mpPathTypes, m_pathTypesOrg.GetData(), len*sizeof(BYTE));
memcpy(mpPathPoints, m_pathPointsOrg.GetData(), len*sizeof(POINT));
- return(true);
+ return true;
}
// CClipper
@@ -979,7 +979,7 @@ CWord* CClipper::Copy() bool CClipper::Append(CWord* w)
{
- return(false);
+ return false;
}
// CLine
@@ -1787,7 +1787,7 @@ bool CRenderedTextSubtitle::Init(CSize size, CRect vidrect) m_sla.Empty();
- return(true);
+ return true;
}
void CRenderedTextSubtitle::Deinit()
@@ -1923,7 +1923,7 @@ void CRenderedTextSubtitle::ParsePolygon(CSubtitle* sub, CStringW str, STSStyle& bool CRenderedTextSubtitle::ParseSSATag(CSubtitle* sub, CStringW str, STSStyle& style, STSStyle& org, bool fAnimate)
{
if(!sub) {
- return(false);
+ return false;
}
int nTags = 0, nUnrecognizedTags = 0;
@@ -2898,13 +2898,13 @@ bool CRenderedTextSubtitle::ParseSSATag(CSubtitle* sub, CStringW str, STSStyle& }
// return(nUnrecognizedTags < nTags);
- return(true); // there are ppl keeping coments inside {}, lets make them happy now
+ return true; // there are ppl keeping coments inside {}, lets make them happy now
}
bool CRenderedTextSubtitle::ParseHtmlTag(CSubtitle* sub, CStringW str, STSStyle& style, STSStyle& org)
{
if(str.Find(L"!--") == 0) {
- return(true);
+ return true;
}
bool fClosing = str[0] == '/';
@@ -3001,10 +3001,10 @@ bool CRenderedTextSubtitle::ParseHtmlTag(CSubtitle* sub, CStringW str, STSStyle& m_kstart = m_kend;
m_kend += wcstol(params[0], NULL, 10);
} else {
- return(false);
+ return false;
}
- return(true);
+ return true;
}
double CRenderedTextSubtitle::CalcAnimation(double dst, double src, bool fAnimate)
@@ -3257,7 +3257,7 @@ STDMETHODIMP_(REFERENCE_TIME) CRenderedTextSubtitle::GetStop(POSITION pos, doubl STDMETHODIMP_(bool) CRenderedTextSubtitle::IsAnimated(POSITION pos)
{
- return(true);
+ return true;
}
struct LSub {
diff --git a/src/Subtitles/Rasterizer.cpp b/src/Subtitles/Rasterizer.cpp index da585a492..431e28be8 100644 --- a/src/Subtitles/Rasterizer.cpp +++ b/src/Subtitles/Rasterizer.cpp @@ -814,7 +814,7 @@ bool Rasterizer::Rasterize(int xsub, int ysub, int fBlur, double fGaussianBlur) byte *tmp = DNew byte[pitch*mOverlayHeight];
if(!tmp) {
- return(false);
+ return false;
}
int border = !mWideOutline.empty() ? 1 : 0;
@@ -836,7 +836,7 @@ bool Rasterizer::Rasterize(int xsub, int ysub, int fBlur, double fGaussianBlur) byte* tmp = DNew byte[pitch*mOverlayHeight];
if(!tmp) {
- return(false);
+ return false;
}
memcpy(tmp, mpOverlayBuffer, pitch*mOverlayHeight);
diff --git a/src/Subtitles/RenderedHdmvSubtitle.cpp b/src/Subtitles/RenderedHdmvSubtitle.cpp index d1acf3f7a..441a61499 100644 --- a/src/Subtitles/RenderedHdmvSubtitle.cpp +++ b/src/Subtitles/RenderedHdmvSubtitle.cpp @@ -91,7 +91,7 @@ STDMETHODIMP_(REFERENCE_TIME) CRenderedHdmvSubtitle::GetStop(POSITION pos, doubl STDMETHODIMP_(bool) CRenderedHdmvSubtitle::IsAnimated(POSITION pos)
{
- return(false);
+ return false;
}
STDMETHODIMP CRenderedHdmvSubtitle::Render(SubPicDesc& spd, REFERENCE_TIME rt, double fps, RECT& bbox)
diff --git a/src/Subtitles/STS.cpp b/src/Subtitles/STS.cpp index 456602606..5c1ac66ca 100644 --- a/src/Subtitles/STS.cpp +++ b/src/Subtitles/STS.cpp @@ -524,7 +524,7 @@ static bool OpenSubRipper(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet (((hh1*60 + mm1)*60) + ss1)*1000 + ms1,
(((hh2*60 + mm2)*60) + ss2)*1000 + ms2);
} else if(c != EOF) { // might be another format
- return(false);
+ return false;
}
}
@@ -557,7 +557,7 @@ static bool OpenOldSubRipper(CTextFile* file, CSimpleTextSubtitle& ret, int Char (((hh1*60 + mm1)*60) + ss1)*1000,
(((hh2*60 + mm2)*60) + ss2)*1000);
} else if(c != EOF) { // might be another format
- return(false);
+ return false;
}
}
@@ -666,7 +666,7 @@ static bool OpenSubViewer(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet (((hh1*60 + mm1)*60) + ss1)*1000 + hs1*10,
(((hh2*60 + mm2)*60) + ss2)*1000 + hs2*10);
} else if(c != EOF) { // might be another format
- return(false);
+ return false;
}
}
@@ -944,7 +944,7 @@ static bool OpenMicroDVD(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet) fCheck2 = true;
}
} else if(c != EOF) { // might be another format
- return(false);
+ return false;
}
}
@@ -1116,7 +1116,7 @@ static bool OpenSami(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet) }
if(!fSAMI) {
- return(false);
+ return false;
}
file->Seek(pos, 0);
@@ -1177,7 +1177,7 @@ static bool OpenSami(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet) file->IsUnicode(),
start_time, MAXLONG);
- return(true);
+ return true;
}
static bool OpenVPlayer(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet)
@@ -1206,7 +1206,7 @@ static bool OpenVPlayer(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet) (((hh*60 + mm)*60) + ss)*1000,
(((hh*60 + mm)*60) + ss)*1000 + 1000 + 50*str.GetLength());
} else if(c != EOF) { // might be another format
- return(false);
+ return false;
}
}
@@ -1273,7 +1273,7 @@ static bool LoadFont(CString& font) CAutoVectorPtr<BYTE> pData;
if(len == 0 || (len&3) == 1 || !pData.Allocate(len)) {
- return(false);
+ return false;
}
const TCHAR* s = font;
@@ -1333,7 +1333,7 @@ static bool LoadFont(CString& font) AddFontResource(fn);
}
- return(true);
+ return true;
}
static bool LoadUUEFont(CTextFile* file)
@@ -1377,7 +1377,7 @@ static bool LoadUUEFont(CTextFile* file) LoadFont(font);
}
- return(true);
+ return true;
}
#ifdef _VSMOD
@@ -1387,7 +1387,7 @@ bool CSimpleTextSubtitle::LoadEfile(CString& img, CString m_fn) CAutoVectorPtr<BYTE> pData;
if(len == 0 || (len&3) == 1 || !pData.Allocate(len)) {
- return(false);
+ return false;
}
const TCHAR* s = img;
@@ -1416,7 +1416,7 @@ bool CSimpleTextSubtitle::LoadEfile(CString& img, CString m_fn) if(t_temp.initImage(pData.m_p,m_fn)) { // save path
mod_images.Add(t_temp);
}
- return(true);
+ return true;
}
@@ -1463,7 +1463,7 @@ bool CSimpleTextSubtitle::LoadUUEFile(CTextFile* file, CString m_fn) LoadEfile(img, m_fn);
}
- return(true);
+ return true;
}
#endif
@@ -1496,7 +1496,7 @@ static bool OpenSubStationAlpha(CTextFile* file, CSimpleTextSubtitle& ret, int C ret.m_dstScreenSize.cx = GetInt(buff);
} catch(...) {
ret.m_dstScreenSize = CSize(0, 0);
- return(false);
+ return false;
}
if(ret.m_dstScreenSize.cy <= 0) {
@@ -1509,7 +1509,7 @@ static bool OpenSubStationAlpha(CTextFile* file, CSimpleTextSubtitle& ret, int C ret.m_dstScreenSize.cy = GetInt(buff);
} catch(...) {
ret.m_dstScreenSize = CSize(0, 0);
- return(false);
+ return false;
}
if(ret.m_dstScreenSize.cx <= 0) {
@@ -1522,7 +1522,7 @@ static bool OpenSubStationAlpha(CTextFile* file, CSimpleTextSubtitle& ret, int C ret.m_defaultWrapStyle = GetInt(buff);
} catch(...) {
ret.m_defaultWrapStyle = 1;
- return(false);
+ return false;
}
} else if(entry == L"scripttype") {
if(buff.GetLength() >= 4 && !buff.Right(4).CompareNoCase(L"4.00")) {
@@ -1552,7 +1552,7 @@ static bool OpenSubStationAlpha(CTextFile* file, CSimpleTextSubtitle& ret, int C } else if(entry == L"style") {
STSStyle* style = DNew STSStyle;
if(!style) {
- return(false);
+ return false;
}
try {
@@ -1647,7 +1647,7 @@ static bool OpenSubStationAlpha(CTextFile* file, CSimpleTextSubtitle& ret, int C ret.AddStyle(StyleName, style);
} catch(...) {
delete style;
- return(false);
+ return false;
}
} else if(entry == L"[events]") {
fRet = true;
@@ -1700,7 +1700,7 @@ static bool OpenSubStationAlpha(CTextFile* file, CSimpleTextSubtitle& ret, int C marginRect,
layer);
} catch(...) {
- return(false);
+ return false;
}
} else if(entry == L"fontname") {
LoadUUEFont(file);
@@ -1743,7 +1743,7 @@ static bool OpenXombieSub(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet ret.m_dstScreenSize.cx = GetInt(buff);
} catch(...) {
ret.m_dstScreenSize = CSize(0, 0);
- return(false);
+ return false;
}
if(ret.m_dstScreenSize.cy <= 0) {
@@ -1756,7 +1756,7 @@ static bool OpenXombieSub(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet ret.m_dstScreenSize.cy = GetInt(buff);
} catch(...) {
ret.m_dstScreenSize = CSize(0, 0);
- return(false);
+ return false;
}
if(ret.m_dstScreenSize.cx <= 0) {
@@ -1767,7 +1767,7 @@ static bool OpenXombieSub(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet } else if(entry == L"style") {
STSStyle* style = DNew STSStyle;
if(!style) {
- return(false);
+ return false;
}
try {
@@ -1814,7 +1814,7 @@ static bool OpenXombieSub(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet ret.AddStyle(StyleName, style);
} catch(...) {
delete style;
- return(false);
+ return false;
}
} else if(entry == L"line") {
try {
@@ -1855,7 +1855,7 @@ static bool OpenXombieSub(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet marginRect,
layer);
} catch(...) {
- return(false);
+ return false;
}
} else if(entry == L"fontname") {
LoadUUEFont(file);
@@ -1879,14 +1879,14 @@ static bool OpenUSF(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet) if(str.Find(_T("USFSubtitles")) >= 0) {
CUSFSubtitles usf;
if(usf.Read(file->GetFilePath()) && usf.ConvertToSTS(ret)) {
- return(true);
+ return true;
}
break;
}
}
- return(false);
+ return false;
}
static CStringW MPL22SSA(CStringW str)
@@ -1923,7 +1923,7 @@ static bool OpenMPL2(CTextFile* file, CSimpleTextSubtitle& ret, int CharSet) file->IsUnicode(),
start*100, end*100);
} else if(c != EOF) { // might be another format
- return(false);
+ return false;
}
}
@@ -2067,7 +2067,7 @@ bool CSimpleTextSubtitle::CopyStyles(const CSTSStyleMap& styles, bool fAppend) STSStyle* s = DNew STSStyle;
if(!s) {
- return(false);
+ return false;
}
*s = *val;
@@ -2075,7 +2075,7 @@ bool CSimpleTextSubtitle::CopyStyles(const CSTSStyleMap& styles, bool fAppend) AddStyle(key, s);
}
- return(true);
+ return true;
}
void CSimpleTextSubtitle::Empty()
@@ -2755,7 +2755,7 @@ bool CSimpleTextSubtitle::Open(CString videoFn, CString subFn, int charSet, CStr CWebTextFile f;
if(!f.Open(subFn)) {
- return(false);
+ return false;
}
videoFn.Replace('\\', '/');
@@ -2795,7 +2795,7 @@ bool CSimpleTextSubtitle::Open(CString fn, int CharSet, CString name) CWebTextFile f;
if(!f.Open(fn)) {
- return(false);
+ return false;
}
fn.Replace('\\', '/');
@@ -2869,27 +2869,27 @@ bool CSimpleTextSubtitle::Open(CTextFile* f, int CharSet, CString name) m_dstScreenSize = CSize(384, 288);
}
- return(true);
+ return true;
}
- return(false);
+ return false;
}
bool CSimpleTextSubtitle::Open(BYTE* data, int len, int CharSet, CString name)
{
TCHAR path[_MAX_PATH];
if(!GetTempPath(_MAX_PATH, path)) {
- return(false);
+ return false;
}
TCHAR fn[_MAX_PATH];
if(!GetTempFileName(path, _T("vs"), 0, fn)) {
- return(false);
+ return false;
}
FILE* tmp = _tfopen(fn, _T("wb"));
if(!tmp) {
- return(false);
+ return false;
}
int i = 0;
@@ -2920,7 +2920,7 @@ bool CSimpleTextSubtitle::SaveAs(CString fn, exttype et, double fps, CTextFile:: CTextFile f;
if(!f.Save(fn, e)) {
- return(false);
+ return false;
}
if(et == EXTSMI) {
@@ -3111,7 +3111,7 @@ bool CSimpleTextSubtitle::SaveAs(CString fn, exttype et, double fps, CTextFile:: if(!m_fUsingAutoGeneratedDefaultStyle && m_styles.Lookup(_T("Default"), s) && et != EXTSSA && et != EXTASS) {
CTextFile f;
if(!f.Save(fn + _T(".style"), e)) {
- return(false);
+ return false;
}
CString str, str2;
@@ -3143,7 +3143,7 @@ bool CSimpleTextSubtitle::SaveAs(CString fn, exttype et, double fps, CTextFile:: f.WriteString(str2);
}
- return(true);
+ return true;
}
////////////////////////////////////////////////////////////////////
diff --git a/src/Subtitles/TextFile.cpp b/src/Subtitles/TextFile.cpp index fe85256b7..864e1e8d8 100644 --- a/src/Subtitles/TextFile.cpp +++ b/src/Subtitles/TextFile.cpp @@ -35,7 +35,7 @@ CTextFile::CTextFile(enc e) bool CTextFile::Open(LPCTSTR lpszFileName)
{
if(!__super::Open(lpszFileName, modeRead|typeBinary|shareDenyNone)) {
- return(false);
+ return false;
}
m_encoding = m_defaultencoding;
@@ -69,17 +69,17 @@ bool CTextFile::Open(LPCTSTR lpszFileName) if(m_encoding == m_defaultencoding) {
__super::Close(); // CWebTextFile::Close() would delete the temp file if we called it...
if(!__super::Open(lpszFileName, modeRead|typeText|shareDenyNone)) {
- return(false);
+ return false;
}
}
- return(true);
+ return true;
}
bool CTextFile::Save(LPCTSTR lpszFileName, enc e)
{
if(!__super::Open(lpszFileName, modeCreate|modeWrite|shareDenyWrite|(e==ASCII?typeText:typeBinary))) {
- return(false);
+ return false;
}
if(e == UTF8) {
@@ -412,7 +412,7 @@ bool CWebTextFile::Open(LPCTSTR lpszFileName) CAutoPtr<CStdioFile> f(is.OpenURL(fn, 1, INTERNET_FLAG_TRANSFER_BINARY|INTERNET_FLAG_EXISTING_CONNECT));
if(!f) {
- return(false);
+ return false;
}
TCHAR path[_MAX_PATH];
@@ -426,7 +426,7 @@ bool CWebTextFile::Open(LPCTSTR lpszFileName) CFile temp;
if(!temp.Open(fn, modeCreate|modeWrite|typeBinary|shareDenyWrite)) {
f->Close();
- return(false);
+ return false;
}
BYTE buff[1024];
@@ -443,7 +443,7 @@ bool CWebTextFile::Open(LPCTSTR lpszFileName) f->Close(); // must close it because the desctructor doesn't seem to do it and we will get an exception when "is" is destroying
} catch(CInternetException* ie) {
ie->Delete();
- return(false);
+ return false;
}
return __super::Open(m_tempfn);
@@ -453,7 +453,7 @@ bool CWebTextFile::Save(LPCTSTR lpszFileName, enc e) {
// CWebTextFile is read-only...
ASSERT(0);
- return(false);
+ return false;
}
void CWebTextFile::Close()
diff --git a/src/Subtitles/USFSubtitles.cpp b/src/Subtitles/USFSubtitles.cpp index 1ebefa9be..b778aceae 100644 --- a/src/Subtitles/USFSubtitles.cpp +++ b/src/Subtitles/USFSubtitles.cpp @@ -195,7 +195,7 @@ bool CUSFSubtitles::Read(LPCTSTR fn) if(FAILED(pDoc.CoCreateInstance(CLSID_DOMDocument))
|| FAILED(pDoc->put_async(VARIANT_FALSE))
|| FAILED(pDoc->load(CComVariant(fn), &vb)) || vb != VARIANT_TRUE) {
- return(false);
+ return false;
}
styles.RemoveAll();
@@ -203,7 +203,7 @@ bool CUSFSubtitles::Read(LPCTSTR fn) texts.RemoveAll();
if(!ParseUSFSubtitles(CComQIPtr<IXMLDOMNode>(pDoc))) {
- return(false);
+ return false;
}
POSITION pos = styles.GetHeadPosition();
@@ -295,7 +295,7 @@ bool CUSFSubtitles::Read(LPCTSTR fn) }
}
- return(true);
+ return true;
}
bool CUSFSubtitles::ConvertToSTS(CSimpleTextSubtitle& sts)
@@ -448,7 +448,7 @@ bool CUSFSubtitles::ConvertToSTS(CSimpleTextSubtitle& sts) sts.Add(t->str, true, t->start, t->stop, WToT(t->style), _T(""), _T(""), marginRect);
}
- return(true);
+ return true;
}
bool CUSFSubtitles::ParseUSFSubtitles(CComPtr<IXMLDOMNode> pNode)
@@ -539,17 +539,17 @@ bool CUSFSubtitles::ParseUSFSubtitles(CComPtr<IXMLDOMNode> pNode) }
EndEnumChildren
- return(true);
+ return true;
}
BeginEnumChildren(pNode, pChild) {
if(ParseUSFSubtitles(pChild)) {
- return(true);
+ return true;
}
}
EndEnumChildren
- return(false);
+ return false;
}
void CUSFSubtitles::ParseMetadata(CComPtr<IXMLDOMNode> pNode, metadata_t& m)
diff --git a/src/Subtitles/VobSubFile.cpp b/src/Subtitles/VobSubFile.cpp index e5b28e2b8..0d4c297b1 100644 --- a/src/Subtitles/VobSubFile.cpp +++ b/src/Subtitles/VobSubFile.cpp @@ -278,7 +278,7 @@ bool CVobSubFile::Copy(CVobSubFile& vsf) m_sub.SetLength(m_sub.GetPosition());
- return(true);
+ return true;
}
//
@@ -347,12 +347,12 @@ bool CVobSubFile::Open(CString fn) }
}
- return(true);
+ return true;
} while(false);
Close();
- return(false);
+ return false;
}
bool CVobSubFile::Save(CString fn, SubFormat sf)
@@ -361,7 +361,7 @@ bool CVobSubFile::Save(CString fn, SubFormat sf) CVobSubFile vsf(NULL);
if(!vsf.Copy(*this)) {
- return(false);
+ return false;
}
switch(sf) {
@@ -381,7 +381,7 @@ bool CVobSubFile::Save(CString fn, SubFormat sf) break;
}
- return(false);
+ return false;
}
void CVobSubFile::Close()
@@ -405,7 +405,7 @@ bool CVobSubFile::ReadIdx(CString fn, int& ver) {
CWebTextFile f;
if(!f.Open(fn)) {
- return(false);
+ return false;
}
bool fError = false;
@@ -721,7 +721,7 @@ bool CVobSubFile::ReadSub(CString fn) {
CFile f;
if(!f.Open(fn, CFile::modeRead|CFile::typeBinary|CFile::shareDenyNone)) {
- return(false);
+ return false;
}
m_sub.SetLength(f.GetLength());
@@ -733,7 +733,7 @@ bool CVobSubFile::ReadSub(CString fn) m_sub.Write(buff, len);
}
- return(true);
+ return true;
}
static unsigned char* RARbuff = NULL;
@@ -757,7 +757,7 @@ bool CVobSubFile::ReadRar(CString fn) HMODULE h = LoadLibrary(_T("unrar.dll"));
#endif
if(!h) {
- return(false);
+ return false;
}
RAROpenArchiveEx OpenArchiveEx = (RAROpenArchiveEx)GetProcAddress(h, "RAROpenArchiveEx");
@@ -771,7 +771,7 @@ bool CVobSubFile::ReadRar(CString fn) if(!(OpenArchiveEx && CloseArchive && ReadHeaderEx && ProcessFile
&& SetChangeVolProc && SetProcessDataProc && SetPassword)) {
FreeLibrary(h);
- return(false);
+ return false;
}
struct RAROpenArchiveDataEx ArchiveDataEx;
@@ -791,7 +791,7 @@ bool CVobSubFile::ReadRar(CString fn) HANDLE hrar = OpenArchiveEx(&ArchiveDataEx);
if(!hrar) {
FreeLibrary(h);
- return(false);
+ return false;
}
SetProcessDataProc(hrar, MyProcessDataProc);
@@ -811,7 +811,7 @@ bool CVobSubFile::ReadRar(CString fn) if(!buff.Allocate(HeaderDataEx.UnpSize)) {
CloseArchive(hrar);
FreeLibrary(h);
- return(false);
+ return false;
}
RARbuff = buff;
@@ -821,7 +821,7 @@ bool CVobSubFile::ReadRar(CString fn) CloseArchive(hrar);
FreeLibrary(h);
- return(false);
+ return false;
}
m_sub.SetLength(HeaderDataEx.UnpSize);
@@ -841,7 +841,7 @@ bool CVobSubFile::ReadRar(CString fn) CloseArchive(hrar);
FreeLibrary(h);
- return(true);
+ return true;
}
#define ReadBEdw(var) \
@@ -854,7 +854,7 @@ bool CVobSubFile::ReadIfo(CString fn) {
CFile f;
if(!f.Open(fn, CFile::modeRead|CFile::typeBinary|CFile::shareDenyNone)) {
- return(false);
+ return false;
}
/* PGC1 */
@@ -888,14 +888,14 @@ bool CVobSubFile::ReadIfo(CString fn) m_orgpal[i].rgbBlue = (BYTE)min(max(1.0*y + 1.7710*(v-128), 0) , 255);
}
- return(true);
+ return true;
}
bool CVobSubFile::WriteIdx(CString fn)
{
CTextFile f;
if(!f.Save(fn, CTextFile::ASCII)) {
- return(false);
+ return false;
}
CString str;
@@ -1056,18 +1056,18 @@ bool CVobSubFile::WriteIdx(CString fn) f.WriteString(_T("\n"));
}
- return(true);
+ return true;
}
bool CVobSubFile::WriteSub(CString fn)
{
CFile f;
if(!f.Open(fn, CFile::modeCreate|CFile::modeWrite|CFile::typeBinary|CFile::shareDenyWrite)) {
- return(false);
+ return false;
}
if(m_sub.GetLength() == 0) {
- return(true); // nothing to do...
+ return true; // nothing to do...
}
m_sub.SeekToBegin();
@@ -1078,7 +1078,7 @@ bool CVobSubFile::WriteSub(CString fn) f.Write(buff, len);
}
- return(true);
+ return true;
}
//
@@ -1157,7 +1157,7 @@ bool CVobSubFile::GetFrame(int idx, int iLang) CAtlArray<SubPos>& sp = m_langs[iLang].subpos;
if(idx < 0 || (size_t)idx >= sp.GetCount()) {
- return(false);
+ return false;
}
if(m_img.iLang != iLang || m_img.iIdx != idx) {
@@ -1165,7 +1165,7 @@ bool CVobSubFile::GetFrame(int idx, int iLang) CAutoVectorPtr<BYTE> buff;
buff.Attach(GetPacket(idx, packetsize, datasize, iLang));
if(!buff || packetsize <= 0 || datasize <= 0) {
- return(false);
+ return false;
}
m_img.start = sp[idx].start;
@@ -1180,7 +1180,7 @@ bool CVobSubFile::GetFrame(int idx, int iLang) }
if(!ret) {
- return(false);
+ return false;
}
m_img.iIdx = idx;
@@ -1291,7 +1291,7 @@ STDMETHODIMP_(REFERENCE_TIME) CVobSubFile::GetStop(POSITION pos, double fps) STDMETHODIMP_(bool) CVobSubFile::IsAnimated(POSITION pos)
{
- return(false);
+ return false;
}
STDMETHODIMP CVobSubFile::Render(SubPicDesc& spd, REFERENCE_TIME rt, double fps, RECT& bbox)
@@ -1647,7 +1647,7 @@ HRESULT CVobSubSettings::Render(SubPicDesc& spd, RECT& bbox) static bool CompressFile(CString fn)
{
if(GetVersion() < 0) {
- return(false);
+ return false;
}
BOOL b = FALSE;
@@ -1674,14 +1674,14 @@ bool CVobSubFile::SaveWinSubMux(CString fn) CStdioFile f;
if(!f.Open(fn + _T(".sub"), CFile::modeCreate|CFile::modeWrite|CFile::typeText|CFile::shareDenyWrite)) {
- return(false);
+ return false;
}
m_img.Invalidate();
CAutoVectorPtr<BYTE> p4bpp;
if(!p4bpp.Allocate(720*576/2)) {
- return(false);
+ return false;
}
CAtlArray<SubPos>& sp = m_langs[m_iLang].subpos;
@@ -1795,7 +1795,7 @@ bool CVobSubFile::SaveWinSubMux(CString fn) }
}
- return(true);
+ return true;
}
bool CVobSubFile::SaveScenarist(CString fn)
@@ -1804,7 +1804,7 @@ bool CVobSubFile::SaveScenarist(CString fn) CStdioFile f;
if(!f.Open(fn + _T(".sst"), CFile::modeCreate|CFile::modeWrite|CFile::typeText|CFile::shareDenyWrite)) {
- return(false);
+ return false;
}
m_img.Invalidate();
@@ -1814,13 +1814,13 @@ bool CVobSubFile::SaveScenarist(CString fn) TCHAR buff[_MAX_PATH], * pFilePart = buff;
if(GetFullPathName(fn, MAX_PATH, buff, &pFilePart) == 0) {
- return(false);
+ return false;
}
CString fullpath = CString(buff).Left(pFilePart - buff);
fullpath.TrimRight(_T("\\/"));
if(fullpath.IsEmpty()) {
- return(false);
+ return false;
}
CString str, str2;
@@ -1894,7 +1894,7 @@ bool CVobSubFile::SaveScenarist(CString fn) CAutoVectorPtr<BYTE> p4bpp;
if(!p4bpp.Allocate((m_size.cy-2)*360)) {
- return(false);
+ return false;
}
BYTE colormap[16];
@@ -2054,7 +2054,7 @@ bool CVobSubFile::SaveScenarist(CString fn) m_fCustomPal = fCustomPal;
memcpy(m_cuspal, tempCusPal, sizeof(m_cuspal));
- return(true);
+ return true;
}
bool CVobSubFile::SaveMaestro(CString fn)
@@ -2063,7 +2063,7 @@ bool CVobSubFile::SaveMaestro(CString fn) CStdioFile f;
if(!f.Open(fn + _T(".son"), CFile::modeCreate|CFile::modeWrite|CFile::typeText|CFile::shareDenyWrite)) {
- return(false);
+ return false;
}
m_img.Invalidate();
@@ -2073,13 +2073,13 @@ bool CVobSubFile::SaveMaestro(CString fn) TCHAR buff[_MAX_PATH], * pFilePart = buff;
if(GetFullPathName(fn, MAX_PATH, buff, &pFilePart) == 0) {
- return(false);
+ return false;
}
CString fullpath = CString(buff).Left(pFilePart - buff);
fullpath.TrimRight(_T("\\/"));
if(fullpath.IsEmpty()) {
- return(false);
+ return false;
}
CString str, str2;
@@ -2129,7 +2129,7 @@ bool CVobSubFile::SaveMaestro(CString fn) CAutoVectorPtr<BYTE> p4bpp;
if(!p4bpp.Allocate((m_size.cy-2)*360)) {
- return(false);
+ return false;
}
BYTE colormap[16];
@@ -2282,7 +2282,7 @@ bool CVobSubFile::SaveMaestro(CString fn) m_fCustomPal = fCustomPal;
memcpy(m_cuspal, tempCusPal, sizeof(m_cuspal));
- return(true);
+ return true;
}
//
@@ -2456,7 +2456,7 @@ STDMETHODIMP_(REFERENCE_TIME) CVobSubStream::GetStop(POSITION pos, double fps) STDMETHODIMP_(bool) CVobSubStream::IsAnimated(POSITION pos)
{
- return(false);
+ return false;
}
STDMETHODIMP CVobSubStream::Render(SubPicDesc& spd, REFERENCE_TIME rt, double fps, RECT& bbox)
diff --git a/src/Subtitles/VobSubFileRipper.cpp b/src/Subtitles/VobSubFileRipper.cpp index 39505c4de..926777235 100644 --- a/src/Subtitles/VobSubFileRipper.cpp +++ b/src/Subtitles/VobSubFileRipper.cpp @@ -126,13 +126,13 @@ bool CVobSubFileRipper::LoadIfo(CString fn) CFileStatus status;
if(!CFileGetStatus(fn, status) || !status.m_size) {
Log(LOG_ERROR, _T("Invalid ifo"));
- return(false);
+ return false;
}
CFile f;
if(!f.Open(fn, CFile::modeRead|CFile::typeBinary|CFile::shareDenyNone)) {
Log(LOG_ERROR, _T("Cannot open ifo"));
- return(false);
+ return false;
}
Log(LOG_INFO, _T("Opening ifo OK"));
@@ -142,7 +142,7 @@ bool CVobSubFileRipper::LoadIfo(CString fn) hdr[12] = 0;
if(strcmp(hdr, "DVDVIDEO-VTS")) {
Log(LOG_ERROR, _T("Not a Video Title Set IFO file!"));
- return(false);
+ return false;
}
// lang ids
@@ -381,7 +381,7 @@ bool CVobSubFileRipper::LoadIfo(CString fn) Log(LOG_INFO, _T("Parsing ifo OK"));
- return(true);
+ return true;
}
bool CVobSubFileRipper::LoadVob(CString fn)
@@ -428,18 +428,18 @@ bool CVobSubFileRipper::LoadVob(CString fn) if(m_vobs.GetCount() <= 0)
{
Log(LOG_ERROR, _T("Nothing found! (%s*.vob)"), fn);
- return(false);
+ return false;
}
*/
CAtlList<CString> vobs;
if(!m_vob.Open(fn, vobs/*m_vobs*/)) {
Log(LOG_ERROR, _T("Cannot open vob sequence"));
- return(false);
+ return false;
}
if(vobs.GetCount() <= 0) {
Log(LOG_ERROR, _T("Nothing found! (%s*.vob)"), fn);
- return(false);
+ return false;
}
POSITION pos = vobs.GetHeadPosition();
@@ -469,12 +469,12 @@ bool CVobSubFileRipper::LoadVob(CString fn) m_vob.Seek(0);
if(!m_vob.Read(buff)) {
Log(LOG_ERROR, _T("Can't read vob, please unlock it with a software player!"));
- return(false);
+ return false;
}
m_vob.Seek(0);
}
- return(true);
+ return true;
}
DWORD CVobSubFileRipper::ThreadProc()
@@ -524,26 +524,26 @@ bool CVobSubFileRipper::Create() if(m_rd.iSelPGC < 0 || (size_t)m_rd.iSelPGC >= m_rd.pgcs.GetCount()) {
Log(LOG_ERROR, _T("Invalid program chain number (%d)!"), m_rd.iSelPGC);
- return(false);
+ return false;
}
PGC& pgc = m_rd.pgcs[m_rd.iSelPGC];
if(pgc.iSelAngle < 0 || pgc.iSelAngle > 9 || pgc.angles[pgc.iSelAngle].GetCount() == 0) {
Log(LOG_ERROR, _T("Invalid angle number (%d)!"), pgc.iSelAngle);
- return(false);
+ return false;
}
CAtlArray<vc_t>& angle = pgc.angles[pgc.iSelAngle];
if(m_rd.selids.GetCount() == 0 && !m_rd.fClosedCaption) {
Log(LOG_ERROR, _T("No valid stream set to be extacted!"));
- return(false);
+ return false;
}
if(m_rd.selvcs.GetCount() == 0) {
Log(LOG_ERROR, _T("No valid vob/cell id set to be extacted!"));
- return(false);
+ return false;
}
Log(LOG_INFO, _T("Indexing..."));
@@ -639,7 +639,7 @@ bool CVobSubFileRipper::Create() if(!m_vob.Read(buff)) {
Log(LOG_ERROR, _T("Cannot read, either locked dvd or truncated/missing files!"));
- return(false);
+ return false;
}
curchunk.end = curpos;
@@ -654,7 +654,7 @@ bool CVobSubFileRipper::Create() for(__int64 pos = 0; !m_fBreakThread && pos < endpos; pos += 2048) {
if(!m_vob.Read(buff)) {
Log(LOG_ERROR, _T("Cannot read, either locked dvd or truncated/missing files!"));
- return(false);
+ return false;
}
if(vd.FindKey(buff)) {
@@ -668,7 +668,7 @@ bool CVobSubFileRipper::Create() if(!vd.m_fFoundKey) {
Log(LOG_ERROR, _T("Key not found, can't decrypt!"));
- return(false);
+ return false;
}
Log(LOG_INFO, _T("Key found, continuing extraction..."));
@@ -685,7 +685,7 @@ bool CVobSubFileRipper::Create() if(AfxMessageBox(_T("Bad packet header found, do you want to continue?"), MB_YESNO) == IDNO) {
Log(LOG_ERROR, _T("Terminated!"));
- return(false);
+ return false;
}
}
@@ -812,7 +812,7 @@ bool CVobSubFileRipper::Create() if(sizedone < sizetotal) {
Log(LOG_ERROR, _T("Indexing terminated before reaching the end!"));
Progress(0);
- return(false);
+ return false;
}
if(!fNavpackFound) {
@@ -821,7 +821,7 @@ bool CVobSubFileRipper::Create() Log(LOG_ERROR, _T("Make sure the ripper doesn't strip these packets."));
}
Progress(0);
- return(false);
+ return false;
}
Log(LOG_INFO, _T("Indexing finished"));
@@ -862,7 +862,7 @@ bool CVobSubFileRipper::Create() if(m_iLang != -1) {
if(!Save(m_title)) {
Log(LOG_ERROR, _T("Could not save output files!"));
- return(false);
+ return false;
}
}
@@ -876,7 +876,7 @@ bool CVobSubFileRipper::Create() Log(LOG_INFO, _T("Done!"));
- return(true);
+ return true;
}
static const DWORD s_version = 1;
@@ -893,7 +893,7 @@ bool CVobSubFileRipper::LoadChunks(CAtlArray<vcchunk>& chunks) __int64 voblen = 0;
if(!f.Open(fn, CFile::modeRead|CFile::typeBinary|CFile::shareDenyNone)) {
- return(false);
+ return false;
}
f.Read(&version, sizeof(version));
if(version == 1) {
@@ -907,11 +907,11 @@ bool CVobSubFileRipper::LoadChunks(CAtlArray<vcchunk>& chunks) if(voblen != m_vob.GetLength()) {
chunks.RemoveAll();
- return(false);
+ return false;
}
if(!f.Open(m_infn, CFile::modeRead|CFile::typeBinary|CFile::shareDenyNone)) {
- return(false);
+ return false;
}
DWORD dw, chksum2 = 0;
while(f.Read(&dw, sizeof(dw)) == sizeof(dw)) {
@@ -921,10 +921,10 @@ bool CVobSubFileRipper::LoadChunks(CAtlArray<vcchunk>& chunks) if(chksum != chksum2) {
chunks.RemoveAll();
- return(false);
+ return false;
}
- return(true);
+ return true;
}
bool CVobSubFileRipper::SaveChunks(CAtlArray<vcchunk>& chunks)
@@ -939,7 +939,7 @@ bool CVobSubFileRipper::SaveChunks(CAtlArray<vcchunk>& chunks) __int64 voblen = m_vob.GetLength();
if(!f.Open(m_infn, CFile::modeRead|CFile::typeBinary|CFile::shareDenyNone)) {
- return(false);
+ return false;
}
DWORD dw;
while(f.Read(&dw, sizeof(dw)) == sizeof(dw)) {
@@ -948,7 +948,7 @@ bool CVobSubFileRipper::SaveChunks(CAtlArray<vcchunk>& chunks) f.Close();
if(!f.Open(fn, CFile::modeCreate|CFile::modeWrite|CFile::typeBinary|CFile::shareDenyWrite)) {
- return(false);
+ return false;
}
f.Write(&s_version, sizeof(s_version));
f.Write(&chksum, sizeof(chksum));
@@ -957,7 +957,7 @@ bool CVobSubFileRipper::SaveChunks(CAtlArray<vcchunk>& chunks) f.Write(chunks.GetData(), sizeof(vcchunk)*chunklen);
f.Close();
- return(true);
+ return true;
}
// IVSFRipper
diff --git a/src/Subtitles/VobSubImage.cpp b/src/Subtitles/VobSubImage.cpp index 4edcd2d85..8af7abe1c 100644 --- a/src/Subtitles/VobSubImage.cpp +++ b/src/Subtitles/VobSubImage.cpp @@ -50,14 +50,14 @@ bool CVobSubImage::Alloc(int w, int h) lpTemp1 = DNew RGBQUAD[w*h];
if(!lpTemp1) {
- return(false);
+ return false;
}
lpTemp2 = DNew RGBQUAD[(w+2)*(h+2)];
if(!lpTemp2) {
delete [] lpTemp1;
lpTemp1 = NULL;
- return(false);
+ return false;
}
org.cx = w;
@@ -66,7 +66,7 @@ bool CVobSubImage::Alloc(int w, int h) lpPixels = lpTemp1;
- return(true);
+ return true;
}
void CVobSubImage::Free()
@@ -93,7 +93,7 @@ bool CVobSubImage::Decode(BYTE* lpData, int packetsize, int datasize, GetPacketInfo(lpData, packetsize, datasize);
if(!Alloc(rect.Width(), rect.Height())) {
- return(false);
+ return false;
}
lpPixels = lpTemp1;
@@ -141,7 +141,7 @@ bool CVobSubImage::Decode(BYTE* lpData, int packetsize, int datasize, TrimSubImage();
}
- return(true);
+ return true;
}
void CVobSubImage::GetPacketInfo(BYTE* lpData, int packetsize, int datasize)
@@ -540,7 +540,7 @@ static bool FitLine(COutline& o, int& start, int& end) {
int len = int(o.pa.GetCount());
if(len < 7) {
- return(false); // small segments should be handled with beziers...
+ return false; // small segments should be handled with beziers...
}
for(start = 0; start < len && !o.da[start]; start++) {
@@ -551,7 +551,7 @@ static bool FitLine(COutline& o, int& start, int& end) }
if(end-start < 8 || end-start < (len-end)+(start-0)) {
- return(false);
+ return false;
}
CUIntArray la, ra;
@@ -563,7 +563,7 @@ static bool FitLine(COutline& o, int& start, int& end) continue;
}
if(o.da[i] == o.da[k]) {
- return(false);
+ return false;
}
if(o.da[i] == -1) {
la.Add(i-k);
@@ -589,16 +589,16 @@ static bool FitLine(COutline& o, int& start, int& end) }
if(!fl && !fr) {
- return(false); // can't be a line if there are bigger steps than one in both directions (lines are usually drawn by stepping one either horizontally or vertically)
+ return false; // can't be a line if there are bigger steps than one in both directions (lines are usually drawn by stepping one either horizontally or vertically)
}
if(fl && fr && 1.0*(end-start)/((len-end)*2+(start-0)*2) > 0.4) {
- return(false); // if this section is relatively too small it may only be a rounded corner
+ return false; // if this section is relatively too small it may only be a rounded corner
}
if(!fl && la.GetSize() > 0 && la.GetSize() <= 4 && (la[0] == 1 && la[la.GetSize()-1] == 1)) {
- return(false); // one step at both ends, doesn't sound good for a line (may be it was skewed, so only eliminate smaller sections where beziers going to look just as good)
+ return false; // one step at both ends, doesn't sound good for a line (may be it was skewed, so only eliminate smaller sections where beziers going to look just as good)
}
if(!fr && ra.GetSize() > 0 && ra.GetSize() <= 4 && (ra[0] == 1 && ra[ra.GetSize()-1] == 1)) {
- return(false); // -''-
+ return false; // -''-
}
CUIntArray& a = !fl ? la : ra;
@@ -618,15 +618,15 @@ static bool FitLine(COutline& o, int& start, int& end) }
if(k - j > 2 && 1.0*sum/len < 2) {
- return(false);
+ return false;
}
if(k - j > 2 && 1.0*sum/len >= 2 && len < 4) {
- return(false);
+ return false;
}
if((la.GetSize()/2+ra.GetSize()/2)/2 <= 2) {
if((k+j)/2 < 2 && k*j!=1) {
- return(false);
+ return false;
}
}
@@ -735,7 +735,7 @@ static bool MinMaxCosfi(COutline& o, double& mincf, double& maxcf) // not really int len = (int)pa.GetCount();
if(len < 6) {
- return(false);
+ return false;
}
mincf = 1;
@@ -761,7 +761,7 @@ static bool MinMaxCosfi(COutline& o, double& mincf, double& maxcf) // not really }
}
- return(true);
+ return true;
}
static bool FitBezierVH(COutline& o, CPoint& p1, CPoint& p2)
@@ -773,29 +773,29 @@ static bool FitBezierVH(COutline& o, CPoint& p1, CPoint& p2) int len = (int)pa.GetCount();
if(len <= 1) {
- return(false);
+ return false;
} else if(len == 2) {
CPoint mid = pa[0]+pa[1];
mid.x >>= 1;
mid.y >>= 1;
p1 = p2 = mid;
- return(true);
+ return true;
}
CPoint dir1 = pa[1] - pa[0], dir2 = pa[len-2] - pa[len-1];
if((dir1.x&&dir1.y)||(dir2.x&&dir2.y)) {
- return(false); // we are only fitting beziers with hor./ver. endings
+ return false; // we are only fitting beziers with hor./ver. endings
}
if(CalcPossibleCurveDegree(o) > 3) {
- return(false);
+ return false;
}
double mincf, maxcf;
if(MinMaxCosfi(o, mincf, maxcf)) {
if(maxcf-mincf > 0.8
|| maxcf-mincf > 0.6 && (maxcf >= 0.4 || mincf <= -0.4)) {
- return(false);
+ return false;
}
}
@@ -858,16 +858,16 @@ static bool FitBezierVH(COutline& o, CPoint& p1, CPoint& p2) p2.y = (int)((c11*(c2y-c20*p0.y-c23*p3.y) - (c1y-c10*p0.y-c13*p3.y)*c21) / D + 0.5);
} else { // must not happen
ASSERT(0);
- return(false);
+ return false;
}
// check for "inside-out" beziers
CPoint dir3 = p1 - p0, dir4 = p2 - p3;
if((dir1.x*dir3.x+dir1.y*dir3.y) <= 0 || (dir2.x*dir4.x+dir2.y*dir4.y) <= 0) {
- return(false);
+ return false;
}
- return(true);
+ return true;
}
int CVobSubImage::GrabSegment(int start, COutline& o, COutline& ret)
@@ -1137,7 +1137,7 @@ bool CVobSubImage::Polygonize(CAtlArray<BYTE>& pathTypes, CAtlArray<CPoint>& pat CPoint topleft;
CAutoPtr<CAutoPtrList<COutline> > ol(GetOutlineList(topleft));
if(!ol) {
- return(false);
+ return false;
}
POSITION pos;
@@ -1212,7 +1212,7 @@ bool CVobSubImage::Polygonize(CStringW& assstr, bool fSmooth, int scale) CAtlArray<CPoint> pathPoints;
if(!Polygonize(pathTypes, pathPoints, fSmooth, scale)) {
- return(false);
+ return false;
}
assstr.Format(L"{\\an7\\pos(%d,%d)\\p%d}", rect.left, rect.top, 1+scale);
|