From d3cddf3ccdc8a02157971822abeed65eec851346 Mon Sep 17 00:00:00 2001 From: kamel5 Date: Mon, 5 Jul 2021 15:19:58 +0200 Subject: unsigned int is enough In these cases we do not need a "long unsigned int" --- detailview.c | 2 +- helpers.c | 2 +- imagecache.c | 10 +++++----- imagemagickwrapper.c | 2 +- textwindow.c | 2 +- 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& 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 > 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 > 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 > 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(mainMenuIcons[i], cPoint(mainMenuIconSize, mainMenuIconSize))); } @@ -279,7 +279,7 @@ std::vector > 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(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++; -- cgit v1.2.3