summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-07-05 15:19:58 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-07-12 14:00:56 +0200
commitd3cddf3ccdc8a02157971822abeed65eec851346 (patch)
tree7d57bcfc4156cd66581d3cc64f175579972b4aa1
parentf836d7aa18b562faa32871d3f4e8a5e1d45c6982 (diff)
downloadskin-nopacity-d3cddf3ccdc8a02157971822abeed65eec851346.tar.gz
skin-nopacity-d3cddf3ccdc8a02157971822abeed65eec851346.tar.bz2
unsigned int is enough
In these cases we do not need a "long unsigned int"
-rw-r--r--detailview.c2
-rw-r--r--helpers.c2
-rw-r--r--imagecache.c10
-rw-r--r--imagemagickwrapper.c2
-rw-r--r--textwindow.c2
5 files changed, 9 insertions, 9 deletions
diff --git a/detailview.c b/detailview.c
index 6623e48..4b010cf 100644
--- a/detailview.c
+++ b/detailview.c
@@ -223,7 +223,7 @@ void cNopacityView::CreateFloatingTextWrapper(cTextWrapper *twNarrow, cTextWrapp
std::stringstream sstrTextTall;
std::stringstream sstrTextFull;
- for (long unsigned int i = 0; i < flds.size(); i++) {
+ for (unsigned int i = 0; i < flds.size(); i++) {
if (!flds[i].size()) {
//empty line
linesDrawn++;
diff --git a/helpers.c b/helpers.c
index 5319ada..459fad7 100644
--- a/helpers.c
+++ b/helpers.c
@@ -144,7 +144,7 @@ std::vector<std::string>& splitstring::split(char delim, int rep) {
if (!flds.empty()) flds.clear(); // empty vector if necessary
std::string work = data();
std::string buf = "";
- long unsigned int i = 0;
+ unsigned int i = 0;
while (i < work.length()) {
if (work[i] != delim)
buf += work[i];
diff --git a/imagecache.c b/imagecache.c
index 7cdfd2a..e9caf6e 100644
--- a/imagecache.c
+++ b/imagecache.c
@@ -26,7 +26,7 @@ cImageCache::~cImageCache() {
void cImageCache::CreateCache(void) {
//Menu Icons
std::vector<std::pair<std::string, cPoint> > menuIcons = GetMenuIcons();
- for (long unsigned int i = 0; i < menuIcons.size(); i++) {
+ for (unsigned int i = 0; i < menuIcons.size(); i++) {
std::string iconName = menuIcons[i].first;
cPoint iconSize = menuIcons[i].second;
bool success = LoadIcon(ctMenuIcon, iconName);
@@ -35,7 +35,7 @@ void cImageCache::CreateCache(void) {
}
//Skin Icons
std::vector<std::pair<std::string, sImgProperties> > skinIcons = GetSkinIcons();
- for (long unsigned int i = 0; i < skinIcons.size(); i++) {
+ for (unsigned int i = 0; i < skinIcons.size(); i++) {
std::string iconName = skinIcons[i].first;
sImgProperties iconProps = skinIcons[i].second;
bool success = LoadIcon(ctSkinIcon, iconName);
@@ -139,7 +139,7 @@ cImage *cImageCache::GetLogo(eCacheType type, const cChannel *channel) {
} else {
bool success = LoadLogo(channel);
if (success) {
- if (config.GetValue("limitLogoCache") && (cache->size() >= (long unsigned int)config.GetValue("numLogosMax"))) {
+ if (config.GetValue("limitLogoCache") && (cache->size() >= (unsigned int)config.GetValue("numLogosMax"))) {
//logo cache is full, don't cache anymore
cPoint logoSize = LogoSize(type);
int width = logoSize.X();
@@ -234,7 +234,7 @@ std::vector<std::pair<std::string, cPoint> > cImageCache::GetMenuIcons(void) {
mainMenuIcons.push_back("menuIcons/Plugins");
mainMenuIcons.push_back("menuIcons/Restart");
int mainMenuIconSize = geoManager->menuMainMenuIconSize;
- for (long unsigned int i = 0; i < mainMenuIcons.size(); i++) {
+ for (unsigned int i = 0; i < mainMenuIcons.size(); i++) {
menuIcons.push_back(std::pair<std::string, cPoint>(mainMenuIcons[i], cPoint(mainMenuIconSize, mainMenuIconSize)));
}
@@ -279,7 +279,7 @@ std::vector<std::pair<std::string, sImgProperties> > cImageCache::GetSkinIcons(v
props.width = geoManager->menuHeaderHeight-2;
props.height = geoManager->menuHeaderHeight-2;
props.preserveAspect = true;
- for (long unsigned int i = 0; i < menuHeaderIcons.size(); i++) {
+ for (unsigned int i = 0; i < menuHeaderIcons.size(); i++) {
skinIcons.push_back(std::pair<std::string, sImgProperties>(menuHeaderIcons[i], props));
}
diff --git a/imagemagickwrapper.c b/imagemagickwrapper.c
index 6f14ba4..ac10fba 100644
--- a/imagemagickwrapper.c
+++ b/imagemagickwrapper.c
@@ -139,7 +139,7 @@ void cImageMagickWrapper::CreateGradient(tColor back, tColor blend, int width, i
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
PixelPacket *pixel = pixels + y * width + x;
- long unsigned int opacity = (maxw / width * x + maxh - maxh / height * y) / 2;
+ unsigned int opacity = (maxw / width * x + maxh - maxh / height * y) / 2;
pixel->opacity = (opacity <= MaxRGB) ? opacity : MaxRGB;
}
}
diff --git a/textwindow.c b/textwindow.c
index 4427d94..4ca3b9d 100644
--- a/textwindow.c
+++ b/textwindow.c
@@ -345,7 +345,7 @@ void cNopacityTextWindow::DrawTextWrapperFloat(const char *text, int widthSmall,
int y = top;
int linesDrawn = 0;
bool drawNarrow = true;
- for (long unsigned int i = 0; i < flds.size(); i++) {
+ for (unsigned int i = 0; i < flds.size(); i++) {
if (!flds[i].size()) {
//empty line
linesDrawn++;