Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whitespace cleanups #1091

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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 lib/dvb/decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1489,7 +1489,7 @@ int eTSMPEGDecoder::getVideoGamma()

RESULT eTSMPEGDecoder::prepareFCC(int fe_id, int vpid, int vtype, int pcrpid)
{
//eDebug("[eTSMPEGDecoder] prepareFCC vp : %d, vt : %d, pp : %d, fe : %d", vpid, vtype, pcrpid, fe_id);
//eDebug("[eTSMPEGDecoder] prepareFCC vp : %d, vt : %d, pp : %d, fe : %d", vpid, vtype, pcrpid, fe_id);

if ((fccGetFD() == -1) || (fccSetPids(fe_id, vpid, vtype, pcrpid) < 0) || (fccStart() < 0))
{
Expand Down
4 changes: 2 additions & 2 deletions lib/gdi/lcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ void eDBoxLCD::setFlipped(bool onoff)

void eDBoxLCD::setDump(bool onoff)
{
dump = onoff;
dumpLCD2PNG();
dump = onoff;
dumpLCD2PNG();
}

int eDBoxLCD::setLCDContrast(int contrast)
Expand Down
16 changes: 8 additions & 8 deletions lib/gui/elistbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ void eListbox::moveSelection(long dir)
}
while (newsel != oldsel && !m_content->currentCursorSelectable());
break;
case pageUp:
case pageUp:
case prevPage: {
int pageind;
do
Expand Down Expand Up @@ -437,7 +437,7 @@ void eListbox::updateScrollBar()
}
return;
}

int entries = m_content->size();
if (m_content_changed)
{
Expand Down Expand Up @@ -569,7 +569,7 @@ int eListbox::event(int event, void *data, void *data2)
style->setStyle(painter, eWindowStyle::styleListboxNormal);
if (m_style.m_background_color_set)
painter.setBackgroundColor(m_style.m_background_color);

if (cornerRadius && cornerRadiusEdges)
{
painter.setRadius(cornerRadius, cornerRadiusEdges);
Expand All @@ -591,7 +591,7 @@ int eListbox::event(int event, void *data, void *data2)
{
yoffset = m_scrollbar->size().height() + 5;
}

if (m_orientation == orVertical)
{
for (int y = 0, i = 0; i <= m_items_per_page; y += m_itemheight, ++i)
Expand Down Expand Up @@ -716,7 +716,7 @@ void eListbox::recalcSize()
}

if (m_items_per_page < 0) /* TODO: whyever - our size could be invalid, or itemheigh could be wrongly specified. */
m_items_per_page = 0;
m_items_per_page = 0;

moveSelection(justCheck);
}
Expand Down Expand Up @@ -801,8 +801,8 @@ void eListbox::entryRemoved(int index)
moveSelection(moveUp);
else
moveSelection(justCheck);
if (m_orientation == orVertical)

if (m_orientation == orVertical)
{
if ((m_top <= index) && (index < (m_top + m_items_per_page)))
{
Expand All @@ -822,7 +822,7 @@ void eListbox::entryRemoved(int index)

void eListbox::entryChanged(int index)
{
if (m_orientation == orVertical)
if (m_orientation == orVertical)
{
if ((m_top <= index) && (index < (m_top + m_items_per_page)))
{
Expand Down
4 changes: 2 additions & 2 deletions lib/gui/epixmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <lib/gui/ewidgetdesktop.h>

ePixmap::ePixmap(eWidget *parent)
:eWidget(parent), m_alphatest(false), m_scale(false), m_have_border_color(false), m_border_width(0)
:eWidget(parent), m_alphatest(false), m_scale(false), m_have_border_color(false), m_border_width(0)
{
}

Expand Down Expand Up @@ -120,7 +120,7 @@ int ePixmap::event(int event, void *data, void *data2)
flags = gPainter::BT_ALPHATEST;
else if (m_alphatest == 2)
flags = gPainter::BT_ALPHABLEND;

flags |= m_scale;
painter.setRadius(cornerRadius, getCornerRadiusEdges());
painter.blit(m_pixmap, eRect(ePoint(0, 0), s), eRect(), flags);
Expand Down
2 changes: 1 addition & 1 deletion lib/gui/ewidgetdesktop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void eWidgetDesktop::recalcClipRegions(eWidget *root)
continue; /* WAIT, don't we need to invalidate,whatever */

/* CHECKME: don't we need to recalculate everything? after all, our buffer has changed and is likely to be cleared */
gRegion visible_before = root->m_visible_with_childs;
gRegion visible_before = root->m_visible_with_childs;

comp->m_background_region = gRegion(eRect(comp->m_position, comp->m_screen_size));

Expand Down
18 changes: 9 additions & 9 deletions lib/python/enigma_python.i
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
/*
NOTE: you have two options when adding classes so that
they are callable *from* python.

- either you %include the header file
- or you re-declare it

In both cases, you must #include the required
header file (i.e. the header file itself), otherwise
enigma_python_wrap.cxx won't build.

In case you import the whole header file,
please make sure that no unimportant stuff
is wrapped, as this makes the wrapper stuff
much more complex and it can probably break
much more complex and it can probably break
very easily because of missing typemaps etc.

you could make use of dizzy macros to ensure
that some stuff is left out when parsed as SWIG
definitions, but be sure to not modify the binary
definitions, but be sure to not modify the binary
representation. DON'T USE #ifdef SWIG_COMPILE
for leaving out stuff (unless you *really* know
what you are doing,of course!). you WILL break it.

The better way (with more work) is to re-declare
the class. It won't be compiled, so you can
leave out stuff as you like.



Oh, things like "operator= is private in this context" etc.
is usually caused by not marking PSignals as immutable.
is usually caused by not marking PSignals as immutable.
*/

%module enigma
Expand Down Expand Up @@ -324,7 +324,7 @@ public:

%{
RESULT SwigFromPython(ePtr<gPixmap> &result, PyObject *obj)
{
{
ePtr<gPixmap> *res;

res = 0;
Expand Down
8 changes: 4 additions & 4 deletions lib/service/iservice.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ class eServiceReference
std::string prov;
int number;
#endif
std::string getName() const {
std::string getName() const {
if (!name.empty()) {
std::vector<std::string> name_split = split(name, "•");
std::string name_res = name_split[0];
return name_res;
return name_res;
}
return name;
return name;
}
std::string getProvider() const { return prov; }
void setName( const std::string &s ) { name=s; }
Expand Down Expand Up @@ -209,7 +209,7 @@ class eServiceReference
bool operator<(const eServiceReference &c) const
{
if (!c) return 0;

if (type < c.type)
return 1;

Expand Down
2 changes: 1 addition & 1 deletion lib/service/listboxservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ void eListboxServiceContent::paint(gPainter &painter, eWindowStyle &style, const
yoffs = m_has_next_event ? ctrlHeight - 2 : 5;
}
if (!isMarker && !isDirectory) {
ePtr<gPixmap> &pixmap = service_res_str == "1f" ? m_pixmaps[pic4K] : (service_res_str == "19" || service_res_str == "11") ?
ePtr<gPixmap> &pixmap = service_res_str == "1f" ? m_pixmaps[pic4K] : (service_res_str == "19" || service_res_str == "11") ?
m_pixmaps[picHD] : m_pixmaps[picSD];

if (pixmap)
Expand Down
2 changes: 1 addition & 1 deletion lib/service/listboxservice.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class eListboxServiceContent: public virtual iListboxContent
void setTextTime(const std::string &string) { m_text_time = string; }
void setTextSeparator(const std::string &string) { m_separator = string; }
void setMarkerTextAlignment(const std::string &string) { m_marker_alignment = string; } // currently supports left and center
void setMarkerLineColor(const gRGB &col) {
void setMarkerLineColor(const gRGB &col) {
m_markerline_color = col;
m_markerline_color_set = 1;
}
Expand Down
16 changes: 8 additions & 8 deletions lib/service/servicedvb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ int eStaticServiceDVBPVRInformation::getLength(const eServiceReference &ref)
getName(ref, name); // This also updates m_parser.name
}
m_parser.m_data_ok = 1;
m_parser.m_length = len;
m_parser.m_length = len;
m_parser.m_filesize = s.st_size;
m_parser.updateMeta(ref.path);
return (int)(m_parser.m_length / 90000);
Expand Down Expand Up @@ -1512,8 +1512,8 @@ RESULT eDVBServicePlay::pause(ePtr<iPauseableService> &ptr)
eServiceReferenceDVB sRelayOrigSref;
bool isSRService = ((const eServiceReferenceDVB&)m_reference).getSROriginal(sRelayOrigSref);
/* note: we check for timeshift to be enabled,
not neccessary active. if you pause when timeshift
is not active, you should activate it when unpausing */
not neccessary active. if you pause when timeshift
is not active, you should activate it when unpausing */
if ((!m_is_pvr) && (!m_timeshift_enabled) && (m_reference.path.empty() || isSRService))
{
ptr = nullptr;
Expand Down Expand Up @@ -2309,10 +2309,10 @@ int eDVBServicePlay::selectAudioStream(int i)
a.) we have an entry in the service db for the current service,
b.) we are not playing back something,
c.) we are not selecting the default entry. (we wouldn't change
anything in the best case, or destroy the default setting in
case the real default is not yet available.)
anything in the best case, or destroy the default setting in
case the real default is not yet available.)
d.) we have only one audiostream (overwrite the cache to make sure
the cache contains the correct audio pid and type)
the cache contains the correct audio pid and type)
*/
if (m_dvb_service && ((i != -1) || (program.audioStreams.size() == 1)
|| ((m_dvb_service->getCacheEntry(eDVBService::cMPEGAPID) == -1)
Expand Down Expand Up @@ -2689,13 +2689,13 @@ int eDVBServicePlay::isTimeshiftActive()

int eDVBServicePlay::isTimeshiftEnabled()
{
return m_timeshift_enabled;
return m_timeshift_enabled;
}

RESULT eDVBServicePlay::saveTimeshiftFile()
{
if (!m_timeshift_enabled)
return -1;
return -1;

m_save_timeshift = 1;

Expand Down
8 changes: 4 additions & 4 deletions lib/service/servicemp3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ eServiceMP3::eServiceMP3(eServiceReference ref):
eDebug("[eServiceMP3] Init start %s", ref.toString().c_str());
if (!sref.empty())
{
eDebug("[eServiceMP3] Init start !sref.empty()");
eDebug("[eServiceMP3] Init start !sref.empty()");
std::vector<eIPTVDBItem> &iptv_services = eDVBDB::getInstance()->iptv_services;
for(std::vector<eIPTVDBItem>::iterator it = iptv_services.begin(); it != iptv_services.end(); ++it)
{
Expand All @@ -476,7 +476,7 @@ eServiceMP3::eServiceMP3(eServiceReference ref):
m_currentAudioStream = it->ampeg_pid;
m_currentSubtitleStream = it->subtitle_pid;
m_cachedSubtitleStream = m_currentSubtitleStream;
eDebug("[eServiceMP3] Init start iptv_service use sref pid's A: %d; S: %d", m_currentAudioStream, it->subtitle_pid);
eDebug("[eServiceMP3] Init start iptv_service use sref pid's A: %d; S: %d", m_currentAudioStream, it->subtitle_pid);
}
}
}
Expand Down Expand Up @@ -2672,7 +2672,7 @@ void eServiceMP3::pullSubtitle(GstBuffer *buffer)
{
uint8_t * data = map.data;
m_dvb_subtitle_parser->processBuffer(data, len, buf_pos / 1000000ULL);
}
}
else if ( subType < stVOB )
{
int delay = eConfigManager::getConfigIntValue("config.subtitles.pango_subtitles_delay");
Expand Down Expand Up @@ -2727,7 +2727,7 @@ void eServiceMP3::pushDVBSubtitles()
}
else
return;

decoder_ms = running_pts / 90;

// If subtitle is overdue or within 20ms the video timing then display it.
Expand Down
6 changes: 3 additions & 3 deletions main/bsod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void bsodFatal(const char *component)

std::string logtail;
int lines = 20;

if (logp2)
{
unsigned int size = logs2;
Expand All @@ -218,7 +218,7 @@ void bsodFatal(const char *component)
if (!lines) {
logtail = std::string(r, logs2 - size);
break;
}
}
}
else {
logtail = std::string(logp2, logs2);
Expand All @@ -238,7 +238,7 @@ void bsodFatal(const char *component)
if (!lines) {
logtail += std::string(r, logs1 - size);
break;
}
}
}
else {
logtail += std::string(logp1, logs1);
Expand Down
6 changes: 3 additions & 3 deletions main/enigma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,16 +153,16 @@ static const std::string getConfigCurrentSpinner(const char* key)
{
auto value = eSimpleConfig::getString(key);

// if value is NOT empty, means config.skin.primary_skin exists in settings file, so return SCOPE_CURRENT_SKIN + "/spinner"
// ( /usr/share/enigma2/MYSKIN/spinner ) BUT check if /usr/share/enigma2/MYSKIN/spinner/wait1.png exist
// if value is NOT empty, means config.skin.primary_skin exists in settings file, so return SCOPE_CURRENT_SKIN + "/spinner"
// ( /usr/share/enigma2/MYSKIN/spinner ) BUT check if /usr/share/enigma2/MYSKIN/spinner/wait1.png exist
if (!value.empty())
{
replace(value, "skin.xml", "spinner");
std::string png_location = eEnv::resolve("${datadir}/enigma2/" + value + "/wait1.png");
std::ifstream png(png_location.c_str());
if (png.good()) {
png.close();
return value;
return value;
}
}

Expand Down