Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion xbmc/filesystem/MythFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ bool CMythFile::SkipNext()
{
HandleEvents();
if(m_recorder)
return m_dll->recorder_is_recording(m_recorder) > 0;
return m_dll->recorder_is_recording(m_recorder) > (void *)0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've always preferred the implicit conversion of pointers to boolean. E.g.;

return !!m_dll->recorder_is_recording(m_recorder);

or

if (CGUIDialogNumeric::ShowAndGetTime(time, heading ? heading : g_localizeStrings.Get(21420)))

but this works too ^^


return false;
}
Expand Down
4 changes: 2 additions & 2 deletions xbmc/guilib/GUIEditControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ void CGUIEditControl::OnClick()
dateTime.SetFromDBTime(utf8);
SYSTEMTIME time;
dateTime.GetAsSystemTime(time);
if (CGUIDialogNumeric::ShowAndGetTime(time, heading > 0 ? heading : g_localizeStrings.Get(21420)))
if (CGUIDialogNumeric::ShowAndGetTime(time, heading > (void *)0 ? heading : g_localizeStrings.Get(21420)))
{
dateTime = CDateTime(time);
utf8 = dateTime.GetAsLocalizedTime("", false);
Expand All @@ -311,7 +311,7 @@ void CGUIEditControl::OnClick()
dateTime = CDateTime(2000, 1, 1, 0, 0, 0);
SYSTEMTIME date;
dateTime.GetAsSystemTime(date);
if (CGUIDialogNumeric::ShowAndGetDate(date, heading > 0 ? heading : g_localizeStrings.Get(21420)))
if (CGUIDialogNumeric::ShowAndGetDate(date, heading > (void *)0 ? heading : g_localizeStrings.Get(21420)))
{
dateTime = CDateTime(date);
utf8 = dateTime.GetAsDBDate();
Expand Down
2 changes: 1 addition & 1 deletion xbmc/settings/Settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ void CSettings::GetSources(const TiXmlElement* pRootElement, const CStdString& s
if (pChild)
{
pChild = pChild->FirstChild();
while (pChild > 0)
while (pChild > (void *)0)
{
CStdString strValue = pChild->Value();
if (strValue == "source" || strValue == "bookmark") // "bookmark" left in for backwards compatibility
Expand Down
4 changes: 2 additions & 2 deletions xbmc/utils/RssReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,11 @@ void CRssReader::GetNewsItems(TiXmlElement* channelXmlNode, int iFeed)
if (m_tagSet.empty())
AddTag("title");

while (itemNode > 0)
while (itemNode > (void *)0)
{
TiXmlNode* childNode = itemNode->FirstChild();
mTagElements.clear();
while (childNode > 0)
while (childNode > (void *)0)
{
CStdString strName = childNode->Value();

Expand Down