minor fixes detected by MSVC compiler warning
This commit is contained in:
parent
7a8f7fd7aa
commit
f128fc8f55
2 changed files with 7 additions and 6 deletions
|
@ -329,7 +329,7 @@ dialog_frame& dialog::get_frame()
|
|||
}
|
||||
delete bg_restore_;
|
||||
bg_restore_ = new surface_restorer;
|
||||
frame_ = new dialog_frame(screen, title_, &style_, &blur_, &frame_buttons_, bg_restore_,
|
||||
frame_ = new dialog_frame(screen, title_, &style_, blur_, &frame_buttons_, bg_restore_,
|
||||
help_button_.topic().empty() ? NULL : &help_button_);
|
||||
}
|
||||
return *frame_;
|
||||
|
|
|
@ -714,12 +714,13 @@ surface blur_surface(surface const &surf, int depth)
|
|||
const Uint32 ff = 0xff;
|
||||
|
||||
surface_lock lock(res);
|
||||
for(int y = 0; y < res->h; ++y) {
|
||||
int x, y;
|
||||
for(y = 0; y < res->h; ++y) {
|
||||
const Uint32* front = &queue[0];
|
||||
Uint32* back = &queue[0];
|
||||
Uint32 red = 0, green = 0, blue = 0, avg = 0;
|
||||
Uint32* p = lock.pixels() + y*res->w;
|
||||
for(int x = 0; x <= depth && x < res->w; ++x, ++p) {
|
||||
for(x = 0; x <= depth && x < res->w; ++x, ++p) {
|
||||
red += ((*p) >> 16)&0xFF;
|
||||
green += ((*p) >> 8)&0xFF;
|
||||
blue += (*p)&0xFF;
|
||||
|
@ -731,7 +732,7 @@ surface blur_surface(surface const &surf, int depth)
|
|||
}
|
||||
|
||||
p = lock.pixels() + y*res->w;
|
||||
for(int x = 0; x < res->w; ++x, ++p) {
|
||||
for(x = 0; x < res->w; ++x, ++p) {
|
||||
*p = 0xFF000000 | (minimum(red/avg,ff) << 16) | (minimum(green/avg,ff) << 8) | minimum(blue/avg,ff);
|
||||
if(x >= depth) {
|
||||
red -= ((*front) >> 16)&0xFF;
|
||||
|
@ -758,7 +759,7 @@ surface blur_surface(surface const &surf, int depth)
|
|||
}
|
||||
}
|
||||
|
||||
for(int x = 0; x < res->w; ++x) {
|
||||
for(x = 0; x < res->w; ++x) {
|
||||
const Uint32* front = &queue[0];
|
||||
Uint32* back = &queue[0];
|
||||
Uint32 red = 0, green = 0, blue = 0, avg = 0;
|
||||
|
@ -775,7 +776,7 @@ surface blur_surface(surface const &surf, int depth)
|
|||
}
|
||||
|
||||
p = lock.pixels() + x;
|
||||
for(int y = 0; y < res->h; ++y, p += res->w) {
|
||||
for(y = 0; y < res->h; ++y, p += res->w) {
|
||||
*p = 0xFF000000 | (minimum(red/avg,ff) << 16) | (minimum(green/avg,ff) << 8) | minimum(blue/avg,ff);
|
||||
if(y >= depth) {
|
||||
red -= ((*front) >> 16)&0xFF;
|
||||
|
|
Loading…
Add table
Reference in a new issue