diff options
author | XhmikosR <xhmikosr@gmail.com> | 2014-10-10 13:53:06 +0400 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2014-10-20 09:04:48 +0400 |
commit | 2a0054b97cfa1e434e83016b6c1d5a2fb555956f (patch) | |
tree | 859a3287533516c4ddde6e072653f928721adac7 /src/Subtitles | |
parent | 4d265207e31cafb97a7c3953cf83db5f669cf9f2 (diff) |
Initializer list order fixes.
Found with cppcheck (inconclusive enabled).
Diffstat (limited to 'src/Subtitles')
-rw-r--r-- | src/Subtitles/DVBSub.cpp | 2 | ||||
-rw-r--r-- | src/Subtitles/DVBSub.h | 8 | ||||
-rw-r--r-- | src/Subtitles/RLECodedSubtitle.cpp | 1 | ||||
-rw-r--r-- | src/Subtitles/RTS.cpp | 40 | ||||
-rw-r--r-- | src/Subtitles/Rasterizer.cpp | 4 | ||||
-rw-r--r-- | src/Subtitles/Rasterizer.h | 6 | ||||
-rw-r--r-- | src/Subtitles/RenderingCache.cpp | 10 | ||||
-rw-r--r-- | src/Subtitles/RenderingCache.h | 6 | ||||
-rw-r--r-- | src/Subtitles/STS.cpp | 10 | ||||
-rw-r--r-- | src/Subtitles/VobSubImage.cpp | 20 |
10 files changed, 53 insertions, 54 deletions
diff --git a/src/Subtitles/DVBSub.cpp b/src/Subtitles/DVBSub.cpp index 15b9b5175..3c2315647 100644 --- a/src/Subtitles/DVBSub.cpp +++ b/src/Subtitles/DVBSub.cpp @@ -34,9 +34,9 @@ CDVBSub::CDVBSub(CCritSec* pLock, const CString& name, LCID lcid)
: CRLECodedSubtitle(pLock, name, lcid)
+ , m_nBufferSize(0)
, m_nBufferReadPos(0)
, m_nBufferWritePos(0)
- , m_nBufferSize(0)
, m_pBuffer(nullptr)
{
if (m_name.IsEmpty() || m_name == _T("Unknown")) {
diff --git a/src/Subtitles/DVBSub.h b/src/Subtitles/DVBSub.h index e000801a7..bbfba28d9 100644 --- a/src/Subtitles/DVBSub.h +++ b/src/Subtitles/DVBSub.h @@ -199,12 +199,12 @@ private: bool rendered;
DVB_PAGE()
- : pageTimeOut(0)
+ : rtStart(0)
+ , rtStop(0)
+ , pageTimeOut(0)
, pageVersionNumber(0)
, pageState(0)
- , rendered(false)
- , rtStart(0)
- , rtStop(0) {
+ , rendered(false) {
}
};
diff --git a/src/Subtitles/RLECodedSubtitle.cpp b/src/Subtitles/RLECodedSubtitle.cpp index 0b187d765..88c8bc71e 100644 --- a/src/Subtitles/RLECodedSubtitle.cpp +++ b/src/Subtitles/RLECodedSubtitle.cpp @@ -28,7 +28,6 @@ CRLECodedSubtitle::CRLECodedSubtitle(CCritSec* pLock, const CString& name, LCID , m_name(name) , m_lcid(lcid) { - } STDMETHODIMP CRLECodedSubtitle::NonDelegatingQueryInterface(REFIID riid, void** ppv) diff --git a/src/Subtitles/RTS.cpp b/src/Subtitles/RTS.cpp index ec158b73d..f1a4a290f 100644 --- a/src/Subtitles/RTS.cpp +++ b/src/Subtitles/RTS.cpp @@ -67,22 +67,22 @@ CMyFont::CMyFont(STSStyle& style) CWord::CWord(STSStyle& style, CStringW str, int ktype, int kstart, int kend, double scalex, double scaley,
RenderingCaches& renderingCaches)
- : m_style(style)
+ : m_fDrawn(false)
+ , m_p(INT_MAX, INT_MAX)
+ , m_renderingCaches(renderingCaches)
+ , m_scalex(scalex)
+ , m_scaley(scaley)
, m_str(str)
- , m_width(0)
- , m_ascent(0)
- , m_descent(0)
+ , m_fWhiteSpaceChar(false)
+ , m_fLineBreak(false)
+ , m_style(style)
+ , m_pOpaqueBox(nullptr)
, m_ktype(ktype)
, m_kstart(kstart)
, m_kend(kend)
- , m_fDrawn(false)
- , m_p(INT_MAX, INT_MAX)
- , m_fLineBreak(false)
- , m_fWhiteSpaceChar(false)
- , m_pOpaqueBox(nullptr)
- , m_scalex(scalex)
- , m_scaley(scaley)
- , m_renderingCaches(renderingCaches)
+ , m_width(0)
+ , m_ascent(0)
+ , m_descent(0)
{
if (str.IsEmpty()) {
m_fWhiteSpaceChar = m_fLineBreak = true;
@@ -1096,19 +1096,19 @@ CRect CLine::PaintBody(SubPicDesc& spd, CRect& clipRect, BYTE* pAlphaMask, CPoin CSubtitle::CSubtitle(RenderingCaches& renderingCaches)
: m_renderingCaches(renderingCaches)
- , m_pClipper(nullptr)
- , m_clipInverse(false)
- , m_scalex(1.0)
- , m_scaley(1.0)
, m_scrAlignment(0)
, m_wrapStyle(0)
, m_fAnimated(false)
+ , m_bIsAnimated(false)
, m_relativeTo(STSStyle::AUTO)
+ , m_pClipper(nullptr)
, m_topborder(0)
, m_bottomborder(0)
+ , m_clipInverse(false)
+ , m_scalex(1.0)
+ , m_scaley(1.0)
{
ZeroMemory(m_effects, sizeof(Effect*)*EF_NUMBEROFEFFECTS);
- m_bIsAnimated = false;
}
CSubtitle::~CSubtitle()
@@ -1530,9 +1530,6 @@ CAtlMap<CStringW, SSATagCmd, CStringElementTraits<CStringW>> CRenderedTextSubtit CRenderedTextSubtitle::CRenderedTextSubtitle(CCritSec* pLock)
: CSubPicProviderImpl(pLock)
- , m_bOverrideStyle(false)
- , m_bOverridePlacement(false)
- , m_overridePlacement(50, 90)
, m_time(0)
, m_delay(0)
, m_animStart(0)
@@ -1543,6 +1540,9 @@ CRenderedTextSubtitle::CRenderedTextSubtitle(CCritSec* pLock) , m_kend(0)
, m_nPolygon(0)
, m_polygonBaselineOffset(0)
+ , m_bOverrideStyle(false)
+ , m_bOverridePlacement(false)
+ , m_overridePlacement(50, 90)
{
m_size = CSize(0, 0);
diff --git a/src/Subtitles/Rasterizer.cpp b/src/Subtitles/Rasterizer.cpp index 3c64dea86..4f68ceba5 100644 --- a/src/Subtitles/Rasterizer.cpp +++ b/src/Subtitles/Rasterizer.cpp @@ -44,10 +44,10 @@ int Rasterizer::getOverlayWidth() }
Rasterizer::Rasterizer()
- : mpPathTypes(nullptr)
+ : fFirstSet(false)
+ , mpPathTypes(nullptr)
, mpPathPoints(nullptr)
, mPathPoints(0)
- , fFirstSet(false)
, mpEdgeBuffer(nullptr)
, mEdgeHeapSize(0)
, mEdgeNext(0)
diff --git a/src/Subtitles/Rasterizer.h b/src/Subtitles/Rasterizer.h index 85f414bc5..975c35f11 100644 --- a/src/Subtitles/Rasterizer.h +++ b/src/Subtitles/Rasterizer.h @@ -53,12 +53,12 @@ struct RasterizerNfo { const DWORD* sw, byte* s, byte* srcBody, byte* srcBorder, DWORD* dst, byte* am)
: w(w)
, h(h)
- , xo(xo)
- , yo(yo)
- , overlayp(overlayp)
, spdw(spdw)
+ , overlayp(overlayp)
, pitch(pitch)
, color(color)
+ , xo(xo)
+ , yo(yo)
, sw(sw)
, s(s)
, srcBody(srcBody)
diff --git a/src/Subtitles/RenderingCache.cpp b/src/Subtitles/RenderingCache.cpp index 38737471e..16dd295db 100644 --- a/src/Subtitles/RenderingCache.cpp +++ b/src/Subtitles/RenderingCache.cpp @@ -36,9 +36,9 @@ CTextDimsKey::CTextDimsKey(const CStringW& str, const STSStyle& style) } CTextDimsKey::CTextDimsKey(const CTextDimsKey& textDimsKey) - : m_str(textDimsKey.m_str) + : m_hash(textDimsKey.m_hash) + , m_str(textDimsKey.m_str) , m_style(DEBUG_NEW STSStyle(*textDimsKey.m_style)) - , m_hash(textDimsKey.m_hash) { } @@ -85,10 +85,10 @@ CPolygonPathKey::CPolygonPathKey(const CStringW& str, double scalex, double scal } CPolygonPathKey::CPolygonPathKey(const CPolygonPathKey& polygonPathKey) - : m_str(polygonPathKey.m_str) + : m_hash(polygonPathKey.m_hash) + , m_str(polygonPathKey.m_str) , m_scalex(polygonPathKey.m_scalex) , m_scaley(polygonPathKey.m_scaley) - , m_hash(polygonPathKey.m_hash) { } @@ -119,10 +119,10 @@ COutlineKey::COutlineKey(const CWord* word, CPoint org) COutlineKey::COutlineKey(const COutlineKey& outLineKey) : CTextDimsKey(outLineKey.m_str, *outLineKey.m_style) + , m_hash(outLineKey.m_hash) , m_scalex(outLineKey.m_scalex) , m_scaley(outLineKey.m_scaley) , m_org(outLineKey.m_org) - , m_hash(outLineKey.m_hash) { } diff --git a/src/Subtitles/RenderingCache.h b/src/Subtitles/RenderingCache.h index 03d1b70de..5c55aa392 100644 --- a/src/Subtitles/RenderingCache.h +++ b/src/Subtitles/RenderingCache.h @@ -142,9 +142,9 @@ protected: public: CEllipseKey(int rx, int ry) - : m_rx(rx) - , m_ry(ry) - , m_hash(ULONG((rx << 16) | (ry& WORD_MAX))) {} + : m_hash(ULONG((rx << 16) | (ry& WORD_MAX))) + , m_rx(rx) + , m_ry(ry) {} ULONG GetHash() const { return m_hash; }; diff --git a/src/Subtitles/STS.cpp b/src/Subtitles/STS.cpp index 610e85128..444bd30be 100644 --- a/src/Subtitles/STS.cpp +++ b/src/Subtitles/STS.cpp @@ -1810,17 +1810,17 @@ static int nOpenFuncts = _countof(OpenFuncts); //
CSimpleTextSubtitle::CSimpleTextSubtitle()
- : m_mode(TIME)
+ : m_lcid(0)
+ , m_subtitleType(Subtitle::SRT)
+ , m_mode(TIME)
+ , m_encoding(CTextFile::DEFAULT_ENCODING)
, m_dstScreenSize(CSize(0, 0))
, m_defaultWrapStyle(0)
, m_collisions(0)
, m_fScaledBAS(false)
- , m_encoding(CTextFile::DEFAULT_ENCODING)
- , m_lcid(0)
+ , m_fUsingAutoGeneratedDefaultStyle(false)
, m_ePARCompensationType(EPCTDisabled)
, m_dPARCompensation(1.0)
- , m_subtitleType(Subtitle::SRT)
- , m_fUsingAutoGeneratedDefaultStyle(false)
{
}
diff --git a/src/Subtitles/VobSubImage.cpp b/src/Subtitles/VobSubImage.cpp index e0582b203..f00fb2b4e 100644 --- a/src/Subtitles/VobSubImage.cpp +++ b/src/Subtitles/VobSubImage.cpp @@ -26,24 +26,24 @@ #include <algorithm>
CVobSubImage::CVobSubImage()
- : nLang(SIZE_T_ERROR)
- , nIdx(SIZE_T_ERROR)
- , bForced(false)
- , bAnimated(false)
- , tCurrent(-1)
- , start(0)
- , delay(0)
- , rect(CRect(0, 0, 0, 0))
- , lpPixels(nullptr)
+ : org(CSize(0, 0))
, lpTemp1(nullptr)
, lpTemp2(nullptr)
- , org(CSize(0, 0))
, nPlane(0)
, bCustomPal(false)
, bAligned(true)
, tridx(0)
, orgpal(nullptr)
, cuspal(nullptr)
+ , nLang(SIZE_T_ERROR)
+ , nIdx(SIZE_T_ERROR)
+ , bForced(false)
+ , bAnimated(false)
+ , tCurrent(-1)
+ , start(0)
+ , delay(0)
+ , rect(CRect(0, 0, 0, 0))
+ , lpPixels(nullptr)
{
ZeroMemory(&pal, sizeof(pal));
}
|