Skip to content

Commit

Permalink
tidy: Fix some class member naming. (libmythtv)
Browse files Browse the repository at this point in the history
The clang-tidy "identifier naming" checker pointed out a few places
where class member function names don't use the convention of starting
with 'm_' and then using camelBack case for the rest of the variable
name.  Fix these for naming consistency across the code base.

https://clang.llvm.org/extra/clang-tidy/checks/readability-identifier-naming.html
  • Loading branch information
linuxdude42 committed Jul 27, 2020
1 parent 261a703 commit 5f80a90
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 59 deletions.
14 changes: 7 additions & 7 deletions mythtv/libs/libmythtv/DVD/mythdvdbuffer.cpp
Expand Up @@ -1436,7 +1436,7 @@ QRect MythDVDBuffer::GetButtonCoords(void)
QRect rect(0,0,0,0);
if (!m_buttonExists)
return rect;
rect.setRect(m_hl_button.x(), m_hl_button.y(), m_hl_button.width(), m_hl_button.height());
rect.setRect(m_hlButton.x(), m_hlButton.y(), m_hlButton.width(), m_hlButton.height());
return rect;
}

Expand Down Expand Up @@ -1592,7 +1592,7 @@ bool MythDVDBuffer::DecodeSubtitles(AVSubtitle *Subtitle, int *GotSubtitles,
Subtitle->rects[1]->type = SUBTITLE_BITMAP;
Subtitle->rects[1]->data[1] = static_cast<uint8_t*>(av_malloc(4 *4));
GuessPalette(reinterpret_cast<uint32_t*>(Subtitle->rects[1]->data[1]),
m_button_color, m_button_alpha);
m_buttonColor, m_buttonAlpha);
}
else
FindSmallestBoundingRectangle(Subtitle);
Expand Down Expand Up @@ -1641,19 +1641,19 @@ bool MythDVDBuffer::DVDButtonUpdate(bool ButtonMode)

for (uint i = 0 ; i < 4 ; i++)
{
m_button_alpha[i] = 0xf & (highlight.palette >> (4 * i));
m_button_color[i] = 0xf & (highlight.palette >> (16 + 4 * i));
m_buttonAlpha[i] = 0xf & (highlight.palette >> (4 * i));
m_buttonColor[i] = 0xf & (highlight.palette >> (16 + 4 * i));
}

// If the button overlay has already been decoded, make sure
// the correct palette for the current highlight is set
if (m_dvdMenuButton.rects && (m_dvdMenuButton.num_rects > 1))
{
GuessPalette(reinterpret_cast<uint32_t*>(m_dvdMenuButton.rects[1]->data[1]),
m_button_color, m_button_alpha);
m_buttonColor, m_buttonAlpha);
}

m_hl_button.setCoords(highlight.sx, highlight.sy, highlight.ex, highlight.ey);
m_hlButton.setCoords(highlight.sx, highlight.sy, highlight.ex, highlight.ey);
return ((highlight.sx + highlight.sy) > 0) &&
(highlight.sx < videowidth && highlight.sy < videoheight);
}
Expand Down Expand Up @@ -1692,7 +1692,7 @@ void MythDVDBuffer::ClearMenuSPUParameters(void)

av_free(m_menuSpuPkt);
m_menuBuflength = 0;
m_hl_button.setRect(0, 0, 0, 0);
m_hlButton.setRect(0, 0, 0, 0);
}

int MythDVDBuffer::NumMenuButtons(void) const
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/DVD/mythdvdbuffer.h
Expand Up @@ -196,9 +196,9 @@ class MTV_PUBLIC MythDVDBuffer : public MythOpticalBuffer
uint m_buttonVersion { 1 };
int m_buttonStreamID { 0 };
uint32_t m_clut[16] { 0 };
uint8_t m_button_color[4] { 0 };
uint8_t m_button_alpha[4] { 0 };
QRect m_hl_button { 0, 0, 0, 0 };
uint8_t m_buttonColor[4] { 0 };
uint8_t m_buttonAlpha[4] { 0 };
QRect m_hlButton { 0, 0, 0, 0 };
uint8_t *m_menuSpuPkt { nullptr };
int m_menuBuflength { 0 };
AVSubtitle m_dvdMenuButton { };
Expand Down
28 changes: 14 additions & 14 deletions mythtv/libs/libmythtv/captions/teletextreader.cpp
Expand Up @@ -37,7 +37,7 @@ bool TeletextReader::KeyPress(const QString &key)
key == ACTION_9)
{
numeric_input = true;
m_curpage_showheader = true;
m_curpageShowHeader = true;
if (m_pageinput[0] == ' ')
m_pageinput[0] = '0' + key.toInt();
else if (m_pageinput[1] == ' ')
Expand Down Expand Up @@ -65,29 +65,29 @@ bool TeletextReader::KeyPress(const QString &key)
if (ttpage)
newPage = ttpage->pagenum;
newSubPage = -1;
m_curpage_showheader = true;
m_curpageShowHeader = true;
}
else if (key == ACTION_PREVPAGE)
{
TeletextPage *ttpage = FindPage(m_curpage, -1);
if (ttpage)
newPage = ttpage->pagenum;
newSubPage = -1;
m_curpage_showheader = true;
m_curpageShowHeader = true;
}
else if (key == ACTION_NEXTSUBPAGE)
{
TeletextSubPage *ttpage = FindSubPage(m_curpage, m_cursubpage, 1);
if (ttpage)
newSubPage = ttpage->subpagenum;
m_curpage_showheader = true;
m_curpageShowHeader = true;
}
else if (key == ACTION_PREVSUBPAGE)
{
TeletextSubPage *ttpage = FindSubPage(m_curpage, m_cursubpage, -1);
if (ttpage)
newSubPage = ttpage->subpagenum;
m_curpage_showheader = true;
m_curpageShowHeader = true;
}
else if (key == ACTION_TOGGLEBACKGROUND)
{
Expand All @@ -108,7 +108,7 @@ bool TeletextReader::KeyPress(const QString &key)
{
newPage = page->pagenum;
newSubPage = -1;
m_curpage_showheader = true;
m_curpageShowHeader = true;
}
}
else if (key == ACTION_MENUGREEN)
Expand All @@ -120,7 +120,7 @@ bool TeletextReader::KeyPress(const QString &key)
{
newPage = page->pagenum;
newSubPage = -1;
m_curpage_showheader = true;
m_curpageShowHeader = true;
}
}
else if (key == ACTION_MENUYELLOW)
Expand All @@ -132,7 +132,7 @@ bool TeletextReader::KeyPress(const QString &key)
{
newPage = page->pagenum;
newSubPage = -1;
m_curpage_showheader = true;
m_curpageShowHeader = true;
}
}
else if (key == ACTION_MENUBLUE)
Expand All @@ -144,7 +144,7 @@ bool TeletextReader::KeyPress(const QString &key)
{
newPage = page->pagenum;
newSubPage = -1;
m_curpage_showheader = true;
m_curpageShowHeader = true;
}
}
else if (key == ACTION_MENUWHITE)
Expand All @@ -156,7 +156,7 @@ bool TeletextReader::KeyPress(const QString &key)
{
newPage = page->pagenum;
newSubPage = -1;
m_curpage_showheader = true;
m_curpageShowHeader = true;
}
}
else
Expand Down Expand Up @@ -284,7 +284,7 @@ void TeletextReader::Reset(void)

m_curpage = 0x100;
m_cursubpage = -1;
m_curpage_showheader = true;
m_curpageShowHeader = true;

m_pageinput[0] = '1';
m_pageinput[1] = '0';
Expand Down Expand Up @@ -507,7 +507,7 @@ void TeletextReader::PageUpdated(int page, int subpage)
return;
if (subpage != m_cursubpage && m_cursubpage != -1)
return;
m_page_changed = true;
m_pageChanged = true;
}

void TeletextReader::HeaderUpdated(
Expand All @@ -520,10 +520,10 @@ void TeletextReader::HeaderUpdated(
if (page_ptr == nullptr)
return;

if (!m_curpage_showheader)
if (!m_curpageShowHeader)
return;

m_header_changed = true;
m_headerChanged = true;
}

const TeletextPage *TeletextReader::FindPageInternal(
Expand Down
20 changes: 10 additions & 10 deletions mythtv/libs/libmythtv/captions/teletextreader.h
Expand Up @@ -82,12 +82,12 @@ class TeletextReader
QString GetPage(void);
void SetPage(int page, int subpage);
void SetSubPage(int subpage) { m_cursubpage = subpage; }
bool PageChanged(void) const { return m_page_changed; }
void SetPageChanged(bool changed) { m_page_changed = changed; }
void SetShowHeader(bool show) { m_curpage_showheader = show; }
void SetHeaderChanged(bool changed) { m_header_changed = changed; }
bool IsSubtitle(void) const { return m_curpage_issubtitle; }
void SetIsSubtitle(bool sub) { m_curpage_issubtitle = sub; }
bool PageChanged(void) const { return m_pageChanged; }
void SetPageChanged(bool changed) { m_pageChanged = changed; }
void SetShowHeader(bool show) { m_curpageShowHeader = show; }
void SetHeaderChanged(bool changed) { m_headerChanged = changed; }
bool IsSubtitle(void) const { return m_curpageIsSubtitle; }
void SetIsSubtitle(bool sub) { m_curpageIsSubtitle = sub; }
bool IsTransparent(void) const { return m_transparent; }
bool RevealHidden(void) const { return m_revealHidden; }
int GetPageInput(uint num) const { return m_pageinput[num]; }
Expand Down Expand Up @@ -126,14 +126,14 @@ class TeletextReader

int m_curpage {0x100};
int m_cursubpage {-1};
bool m_curpage_showheader {true};
bool m_curpage_issubtitle {false};
bool m_curpageShowHeader {true};
bool m_curpageIsSubtitle {false};
int m_pageinput[3] {0};
bool m_transparent {false};
bool m_revealHidden {false};
uint8_t m_header[40] {0};
bool m_header_changed {false};
bool m_page_changed {false};
bool m_headerChanged {false};
bool m_pageChanged {false};
TeletextMagazine m_magazines[8] { };
unsigned char m_bitswap[256] {};
int m_fetchpage {0};
Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/mheg/dsmcccache.cpp
Expand Up @@ -273,7 +273,7 @@ DSMCCCacheDir *DSMCCCache::FindGateway(const DSMCCCacheReference &ref)
// the object or one of the parent files.
int DSMCCCache::GetDSMObject(QStringList &objectPath, QByteArray &result)
{
DSMCCCacheDir *dir = FindGateway(m_GatewayRef);
DSMCCCacheDir *dir = FindGateway(m_gatewayRef);
if (dir == nullptr)
return 1; // No gateway yet.

Expand Down Expand Up @@ -319,10 +319,10 @@ int DSMCCCache::GetDSMObject(QStringList &objectPath, QByteArray &result)
// Set the gateway reference from a DSI message.
void DSMCCCache::SetGateway(const DSMCCCacheReference &ref)
{
if (!m_GatewayRef.Equal(ref))
if (!m_gatewayRef.Equal(ref))
{
LOG(VB_DSMCC, LOG_INFO, QString("[DSMCCCache] Setting gateway to reference %1")
.arg(ref.toString()));
m_GatewayRef = ref;
m_gatewayRef = ref;
}
}
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mheg/dsmcccache.h
Expand Up @@ -113,7 +113,7 @@ class DSMCCCache
DSMCCCacheDir *FindDir(const DSMCCCacheReference &ref);
DSMCCCacheDir *FindGateway(const DSMCCCacheReference &ref);

DSMCCCacheReference m_GatewayRef; // Reference to the gateway
DSMCCCacheReference m_gatewayRef; // Reference to the gateway

// The set of directories, files and gateways.
QMap<DSMCCCacheReference, DSMCCCacheDir*> m_directories;
Expand Down
12 changes: 6 additions & 6 deletions mythtv/libs/libmythtv/mheg/mhi.cpp
Expand Up @@ -158,7 +158,7 @@ void MHIContext::StopEngine(void)

m_stop = true;
m_runLock.lock();
m_engine_wait.wakeAll();
m_engineWait.wakeAll();
m_runLock.unlock();

m_engineThread->wait();
Expand Down Expand Up @@ -265,7 +265,7 @@ void MHIContext::run(void)
toWait = (toWait > 1000 || toWait <= 0) ? 1000 : toWait;

if (!m_stop && (toWait > 0))
m_engine_wait.wait(locker.mutex(), toWait);
m_engineWait.wait(locker.mutex(), toWait);
}
}

Expand Down Expand Up @@ -305,7 +305,7 @@ void MHIContext::QueueDSMCCPacket(
componentTag, carouselId,
dataBroadcastId));
}
m_engine_wait.wakeAll();
m_engineWait.wakeAll();
}

// A NetworkBootInfo sub-descriptor is present in the PMT.
Expand All @@ -330,7 +330,7 @@ void MHIContext::SetNetBootInfo(const unsigned char *data, uint length)
if (m_lastNbiVersion == NBI_VERSION_UNSET)
m_lastNbiVersion = data[0];
else
m_engine_wait.wakeAll();
m_engineWait.wakeAll();
}

// Called only by m_engineThread
Expand Down Expand Up @@ -510,7 +510,7 @@ bool MHIContext::GetCarouselData(QString objectPath, QByteArray &result)
// some more packets. We should eventually find out if this item is
// present.
ProcessDSMCCQueue();
m_engine_wait.wait(&m_runLock, 300);
m_engineWait.wait(&m_runLock, 300);
}
return false; // Stop has been set. Say the object isn't present.
}
Expand Down Expand Up @@ -625,7 +625,7 @@ bool MHIContext::OfferKey(const QString& key)
.arg(key).arg(action).arg(m_keyQueue.size()) );
{ QMutexLocker locker(&m_keyLock);
m_keyQueue.enqueue(action);}
m_engine_wait.wakeAll();
m_engineWait.wakeAll();
return true;
}

Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythtv/mheg/mhi.h
Expand Up @@ -195,7 +195,7 @@ class MHIContext : public MHContext, public QRunnable
MHEG *m_engine; // Pointer to the MHEG engine

mutable QMutex m_runLock;
QWaitCondition m_engine_wait; // protected by m_runLock
QWaitCondition m_engineWait; // protected by m_runLock
bool m_stop {false}; // protected by m_runLock
QMutex m_displayLock;
bool m_updated {false};
Expand Down
20 changes: 10 additions & 10 deletions mythtv/libs/libmythtv/mpeg/HEVCParser.cpp
Expand Up @@ -1266,15 +1266,15 @@ bool HEVCParser::parseSliceSegmentHeader(GetBitContext *gb)
}

int pps_id = get_ue_golomb(gb); // slice_pic_parameter_set_id; ue(v)
if (m_PPS.find(pps_id) == m_PPS.end())
if (m_pps.find(pps_id) == m_pps.end())
{
LOG(VB_RECORD, LOG_DEBUG, LOC +
QString("PPS Id %1 not valid yet. Skipping parsing of slice.")
.arg(pps_id));
return false;
}
PPS* pps = &m_PPS[pps_id];
SPS* sps = &m_SPS[pps->sps_id];
PPS* pps = &m_pps[pps_id];
SPS* sps = &m_sps[pps->sps_id];

if (!m_firstSliceSegmentInPicFlag)
{
Expand Down Expand Up @@ -1600,7 +1600,7 @@ bool HEVCParser::parseSPS(GetBitContext *gb)
max_sub_layers_minus1 = ext_or_max_sub_layers_minus1;
else
{
if (m_VPS.find(vps_id) == m_VPS.end())
if (m_vps.find(vps_id) == m_vps.end())
{
LOG(VB_RECORD, LOG_WARNING, LOC +
QString("Could not find VPS[%1]").arg(vps_id));
Expand All @@ -1615,7 +1615,7 @@ bool HEVCParser::parseSPS(GetBitContext *gb)
sps_ext_or_max_sub_layers_minus1
*/
max_sub_layers_minus1 = (ext_or_max_sub_layers_minus1 == 7) ?
m_VPS[vps_id].max_sub_layers :
m_vps[vps_id].max_sub_layers :
ext_or_max_sub_layers_minus1;
}
}
Expand All @@ -1642,7 +1642,7 @@ bool HEVCParser::parseSPS(GetBitContext *gb)
}

uint sps_id = get_ue_golomb(gb); // sps_seq_parameter_set_id ue(v);
SPS* sps = &m_SPS[sps_id];
SPS* sps = &m_sps[sps_id];

if (MultiLayerExtSpsFlag)
{
Expand Down Expand Up @@ -1811,9 +1811,9 @@ bool HEVCParser::parseSPS(GetBitContext *gb)
number of bits used to represent lt_ref_pic_poc_lsb_sps[
i ] is equal to log2_max_pic_order_cnt_lsb_minus4 + 4.
*/
m_POC[i] = get_bits(gb, sps->log2_max_pic_order_cnt_lsb); // u(v)
m_poc[i] = get_bits(gb, sps->log2_max_pic_order_cnt_lsb); // u(v)
LOG(VB_RECORD, LOG_WARNING, LOC +
QString("POC[%1] %2").arg(i).arg(m_POC[i]));
QString("POC[%1] %2").arg(i).arg(m_poc[i]));
get_bits1(gb); // used_by_curr_pic_lt_sps_flag[i] u(1)
}
}
Expand Down Expand Up @@ -1852,7 +1852,7 @@ bool HEVCParser::parseVPS(GetBitContext *gb)

/* uint16_t check = */ get_bits(gb, 16); // vps_reserved_0xffff_16bits u(16)

m_VPS[vps_id].max_sub_layers = max_sub_layers_minus1 + 1;
m_vps[vps_id].max_sub_layers = max_sub_layers_minus1 + 1;
if (!profileTierLevel(gb, true, max_sub_layers_minus1))
{
LOG(VB_RECORD, LOG_WARNING, LOC +
Expand Down Expand Up @@ -1969,7 +1969,7 @@ bool HEVCParser::parseVPS(GetBitContext *gb)
bool HEVCParser::parsePPS(GetBitContext *gb)
{
uint pps_id = get_ue_golomb(gb); // pps_pic_parameter_set_id ue(v)
PPS* pps = &m_PPS[pps_id];
PPS* pps = &m_pps[pps_id];

pps->sps_id = get_ue_golomb(gb); // pps_seq_parameter_set_id; ue(v)
pps->dependent_slice_segments_enabled_flag = get_bits1(gb); // u(1)
Expand Down

0 comments on commit 5f80a90

Please sign in to comment.