diff options
author | Mihai Moldovan <ionic@ionic.de> | 2017-12-28 19:32:22 +0100 |
---|---|---|
committer | Mihai Moldovan <ionic@ionic.de> | 2017-12-28 19:32:22 +0100 |
commit | 2d44051aad601e074790eaf482ef09090131ca5d (patch) | |
tree | 8c5f3113b513f70a5a94f43a0c264d8aff09fbe1 /nxcompshad/src/Core.cpp | |
parent | 061c357727dd6a3a37e547091d76f26c080f0738 (diff) | |
parent | 2cade632b475ecc1a115692ec44bbb36a447ce8b (diff) | |
download | nx-libs-2d44051aad601e074790eaf482ef09090131ca5d.tar.gz nx-libs-2d44051aad601e074790eaf482ef09090131ca5d.tar.bz2 nx-libs-2d44051aad601e074790eaf482ef09090131ca5d.zip |
Merge branch 'uli42-pr/silence_nxcompshad_warnings' into 3.6.x
Fixes: ArcticaProject/nx-libs#572
Diffstat (limited to 'nxcompshad/src/Core.cpp')
-rw-r--r-- | nxcompshad/src/Core.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/nxcompshad/src/Core.cpp b/nxcompshad/src/Core.cpp index f92f85c41..39ac4a3b2 100644 --- a/nxcompshad/src/Core.cpp +++ b/nxcompshad/src/Core.cpp @@ -337,7 +337,10 @@ int CorePoller::isChanged(int (*checkIfInputCallback)(void *), void *arg, int *s } } - XRectangle rect = {0, curLine, width_, 1}; + XRectangle rect = {0, + static_cast<short>(curLine), + static_cast<unsigned short>(width_), + 1}; char *buffer; @@ -443,9 +446,13 @@ int CorePoller::isChanged(int (*checkIfInputCallback)(void *), void *arg, int *s break; } - if ((curWorkLine - last > minSliceHeight_) || (last - start > maxSliceHeight_)) + if ((curWorkLine - last > minSliceHeight_) || + (last - start > maxSliceHeight_)) { - XRectangle rect = {left, start, right - left + 1, last - start + 1}; + XRectangle rect = {static_cast<short>(left), + static_cast<short>(start), + static_cast<unsigned short>(right - left + 1), + static_cast<unsigned short>(last - start + 1)}; XUnionRectWithRegion(&rect, lastUpdatedRegion_, lastUpdatedRegion_); @@ -477,7 +484,10 @@ int CorePoller::isChanged(int (*checkIfInputCallback)(void *), void *arg, int *s if (last >= start) { - XRectangle rect = {left, start, right - left + 1, last - start + 1}; + XRectangle rect = {static_cast<short>(left), + static_cast<short>(start), + static_cast<unsigned short>(right - left + 1), + static_cast<unsigned short>(last - start + 1)}; XUnionRectWithRegion(&rect, lastUpdatedRegion_, lastUpdatedRegion_); } |