@@ -29,7 +29,7 @@ WinServerIconCache::~WinServerIconCache(){
2929 }
3030}
3131
32- WinServerIconCache::WinIcon WinServerIconCache::tryIconLoad (const std::string& name, int dpi, bool smallIcon) {
32+ WinServerIconCache::WinIcon WinServerIconCache::tryIconLoad (const std::string& name, unsigned int dpi, bool smallIcon) {
3333 std::lock_guard lk (cacheMutex_);
3434 const int w = DPIHelper::GetSystemMetricsForDpi (smallIcon ? SM_CXSMICON : SM_CXICON , dpi);
3535 const int h = DPIHelper::GetSystemMetricsForDpi (smallIcon ? SM_CYSMICON : SM_CYICON , dpi);
@@ -73,15 +73,15 @@ WinServerIconCache::WinIcon WinServerIconCache::tryIconLoad(const std::string& n
7373 return item;
7474}
7575
76- NativeBitmap WinServerIconCache::getIconBitmapForServer (const std::string& name, int dpi, bool smallIcon) {
76+ NativeBitmap WinServerIconCache::getIconBitmapForServer (const std::string& name, unsigned int dpi, bool smallIcon) {
7777 return tryIconLoad (name, dpi, smallIcon).bm ;
7878}
7979
80- NativeIcon WinServerIconCache::getIconForServer (const std::string& name, int dpi, bool smallIcon) {
80+ NativeIcon WinServerIconCache::getIconForServer (const std::string& name, unsigned int dpi, bool smallIcon) {
8181 return tryIconLoad (name, dpi, smallIcon).icon ;
8282}
8383
84- NativeIcon WinServerIconCache::getBigIconForServer (const std::string& name, int dpi) {
84+ NativeIcon WinServerIconCache::getBigIconForServer (const std::string& name, unsigned int dpi) {
8585 CString iconFileName = IuCoreUtils::Utf8ToWstring (getIconNameForServer (name, true )).c_str ();
8686
8787 if (iconFileName.IsEmpty ()) {
@@ -109,7 +109,7 @@ NativeIcon WinServerIconCache::getBigIconForServer(const std::string& name, int
109109 return icon;
110110}
111111
112- void WinServerIconCache::loadIcons (int dpi, bool smallIcons) {
112+ void WinServerIconCache::loadIcons (unsigned int dpi, bool smallIcons) {
113113 std::unique_ptr<CImageList, ImageListDeleter> imageList (new CImageList, ImageListDeleter {});
114114 const int iconWidth = DPIHelper::GetSystemMetricsForDpi (smallIcons ? SM_CXSMICON : SM_CXICON , dpi);
115115 const int iconHeight = DPIHelper::GetSystemMetricsForDpi (smallIcons ? SM_CYSMICON : SM_CYICON , dpi);
@@ -137,7 +137,7 @@ void WinServerIconCache::onServerAdded(const std::string& name) {
137137 }
138138}
139139
140- std::optional<WinServerIconCache::ImageListWithIndexes> WinServerIconCache::getCachedImageList (int dpi, bool smallIcons /* = true*/ ) {
140+ std::optional<WinServerIconCache::ImageListWithIndexes> WinServerIconCache::getCachedImageList (unsigned int dpi, bool smallIcons /* = true*/ ) {
141141 std::lock_guard lk (cacheMutex_);
142142 auto it = imageLists_.find ({ dpi, smallIcons });
143143 if (it != imageLists_.end ()) {
@@ -152,7 +152,7 @@ std::optional<WinServerIconCache::ImageListWithIndexes> WinServerIconCache::getC
152152 return {};
153153}
154154
155- void WinServerIconCache::preLoadIcons (int dpi) {
155+ void WinServerIconCache::preLoadIcons (unsigned int dpi) {
156156 if (iconsPreload_) {
157157 throw std::logic_error (" preLoadIcons() should not be called twice" );
158158 }
@@ -165,7 +165,7 @@ void WinServerIconCache::preLoadIcons(int dpi) {
165165 });
166166}
167167
168- WinServerIconCache::ImageListWithIndexes WinServerIconCache::getImageList (int dpi, bool smallIcons) {
168+ WinServerIconCache::ImageListWithIndexes WinServerIconCache::getImageList (unsigned int dpi, bool smallIcons) {
169169 auto imageList = getCachedImageList (dpi, smallIcons);
170170 if (imageList) {
171171 return *imageList;
0 commit comments